7

I want to create the graph, like at the link for the previous topic, but receive error:

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

Though fonts() shows "Humor Sans" and "xksd" are installed. I use Windows 7 64bit, R 2.15.2 RStudio 0.96.331.

Any suggestions how to fix it?

2
  • I'm getting the same issue with OSX but this isn't working.
    – Greg
    Jun 18, 2013 at 16:18
  • Thank you. I also stuck on the same issue. Thanks for your kind solution and help. Just want to add one comment for beginners, i.e. before run font_import() you have to load library(extrafont) Thank you Feb 3, 2017 at 12:14

1 Answer 1

11

I think I had the same problem some time ago. Here is what I did:

  1. Put Humor-Sans font file into your project folder and make sure your working directory is set to the same.

  2. Import the fonts (this might take a while) by calling

    font_import()
    
  3. Look through the list of fonts and see if you can find Humor-Sans by

    fonts()
    
  4. Load the fonts

    loadfonts(device = "win")
    

Let me know if it works!

1
  • Bingo. Thank you very much. I think loadfonts(device="win") is the solution. Dec 21, 2012 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.