I was trying to install the xkcd font for R on my Mac following the instructions in vignette("xkcd-intro")
> download.file("http://simonsoftware.se/other/xkcd.ttf", dest="xkcd.ttf", mode="wb")
essai de l'URL 'http://simonsoftware.se/other/xkcd.ttf'
Content type 'application/x-font-ttf' length 12712 bytes (12 KB)
==================================================
downloaded 12 KB
> system("mkdir ~/.fonts")
> system("cp xkcd.ttf ~/.fonts")
Until here, all seems to be ok be I have an error with the following call to font import
:
> font_import(pattern = "[X/x]kcd", prompt=FALSE)
Scanning ttf files in /Library/Fonts/, /System/Library/Fonts, ~/Library/Fonts/ ...
Extracting .afm files from .ttf files...
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1
How can I fix that? Is there another way to install these font?
I already looked at questions here about R and xkcd font like Not able to install xkcd fonts and xkcd style graph - error with registered fonts but it's not the same problem.