[英]R ggplot2 fonts issue
我试图让gkplot2中的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
你有没有尝试过:
font_import(paths = "~/.fonts", pattern="Humor Sans")
在我看来,“〜/ .fonts”是Mac的默认字体文件夹,因此如果是(或不是)您的操作系统,则在编辑原始问题时应包含更多详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.