Xkcd style graph - error with registered fonts

I want to create a graph, for example, on the link for the previous topic, but get an error:

In grid.Call (L_textBounds, as.graphicsAnnot (x $ label), x $ x, x $ y ,: Font the family was not found in the Windows font database

Although fonts() shows "Humor Sans" and "xksd". I am using Windows 7 64bit, R 2.15.2 RStudio 0.96.331.

Any suggestions for fixing it?

+7
source share
1 answer

I think I had the same problem a while ago. Here is what I did:

  • Place the Humor-Sans font file in the project folder and make sure your working directory is set to the same.

  • Import the fonts (this may take some time) by calling

     font_import() 
  • Browse through the list of fonts and see if you can find Humor-Sans on

     fonts() 
  • Download fonts

     loadfonts(device = "win") 

Let me know if this works!

+10
source

All Articles