【发布时间】:2013-05-06 18:12:55
【问题描述】:
我正在尝试使用 ggplot2 让 xkcd 字体在 R 中工作。但是我遇到了一些问题。 这是我到目前为止所做的。 1) 从目录 ~/.fonts 中的 xkcd 站点安装“Humor Sans”字体 2)安装“extrafont”包。此安装工作顺利。 3) 加载库
library(extrafont)
但是,当我尝试导入字体时,出现以下错误。
> font_import(pattern="Humor Sans")
Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
Continue? [y/n] y
Scanning ttf files in /usr/share/fonts/, ~/.fonts/ ...
Extracting .afm files from .ttf files...
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1
关于我可能做错什么或我应该做什么的任何建议? 提前非常感谢
编辑:运行 ubuntu 12.04
【问题讨论】: