I am trying to get xkcd fonts working in R with ggplot2. However, I run into some problems. Here is what I have done so far. 1) The font "Humor" is installed from the xkcd site in the ~ / .fonts directory 2) The "extrafont" package is installed. This setup worked smoothly. 3) Download the library
library(extrafont)
However, when I try to import a font, I get the following error.
> 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
Any suggestions on what I can do wrong or what else should I do? Thank you very much in advance
edit: Running ubuntu 12.04
source share