I was trying the xkcd font as per the instructions given in the vignette: vignette("xkcd-intro")
However get an error on the following step:
> system("cp xkcd.tff -t ~/.fonts")
cp: xkcd.tff: No such file or directory
cp: -t: No such file or directory
What to do??
Are you sure it's not supposed to be xkcd.ttf
instead of xkcd.tff
?
I'm fairly certain that cp SOURCE OPTION DESTINATION
is not a legal use of cp
on any Unix system. In fact, since you're copying only one file, you don't even need the -t
option. It should probably just be system("cp xkcd.ttf ~/.fonts/")
.
After a lot of trial and error, I was able to get it to work myself. Essentially, you have to copy the downloaded font file to all the folders in font.paths()
.
On OS X:
for(dirs in font.paths()) {
file.copy(file.path(dirs,"xkcd.ttf"), "~/Library/Fonts/")
}
And it's working!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With