I am dealing with fonts in R for the first time. I have tried every solution I could find on stack and elsewhere to get fonts into R for me, but thus far I have had no success. At the most basic level, this is what I am trying to do:
install.packages('extrafonts')
library(extrafonts)
font_import()
At that point, I run into a big mess that I'm not really understanding well. My console shows me that first R is scanning ttf files, then extracting .afm files from .ttf files, and then it repeatedly references these long file extensions followed by ": No FontName. Skipping."
A full piece of the error message looks like this:
/System/Library/Fonts/Supplemental/Arial Unicode.ttfsh: line 1: 39188 Segmentation fault: 11 '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/Supplemental/Arial Unicode.ttf' '/var/folders/3h/yfpgl52j7rbb5l68lrwdvv_m0000gn/T//RtmpgwAvQc/fonts/Arial Unicode' 2>&1
: No FontName. Skipping.
Does anyone have any idea exactly what is going on here?
I know that the fonts aren't importing because when I run loadfonts()
followed by fonts()
or fontstable()
, I get NULL. And when I try to pull a font other than the three native families in R into the theme of my ggplot function, the plot doesn't generate.