xkcd style graph - error with registered fonts

前端 未结 1 2048
悲&欢浪女
悲&欢浪女 2021-01-12 14:02

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

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 14:29

    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!

    0 讨论(0)
提交回复
热议问题