Problem with fonts in mac

When I try to do font_import() to use more fonts in Rstudio, I get this:

Scanning ttf files in /Library/Fonts/, /System/Library/Fonts, ~/Library/Fonts/ ...
Extracting .afm files from .ttf files...
/System/Library/Fonts/Supplemental/Arial Unicode.ttfsh: line 1: 65328 Segmentation fault: 11  '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/Supplemental/Arial Unicode.ttf' '/var/folders/h3/gbg9fh2x6kvgrpzw8tpbj5qh0000gn/T//RtmpI09ceu/fonts/Arial Unicode' 2>&1
 : No FontName. Skipping.

All fonts are bypassed and in warnings alll have this:

1: In system2(ttf2pt1, c(args, shQuote(ttfiles[i]), shQuote(tmpfiles[i])),  ... :
  command executed ''/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rttf2pt1/exec//ttf2pt1' -a -GfAe '/System/Library/Fonts/Supplemental/Arial Unicode.ttf' '/var/folders/h3/gbg9fh2x6kvgrpzw8tpbj5qh0000gn/T//RtmpI09ceu/fonts/Arial Unicode' 2>&1' have status 139

Any ideas on how to solve it?

I had the same issue. Please see solution at
https://issueexplorer.com/issue/wch/extrafont/89

Not working for me. I get this error:

Scanning ttf files in /Library/Fonts/, /System/Library/Fonts, ~/Library/Fonts/ ...
Extracting .afm files from .ttf files...
Error in ttf_extract(ttfiles) : 
  lazy-load database '/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rttf2pt1/R/Rttf2pt1.rdb' is corrupt

I'm on macOS BigSur, V11.6.1.

I first deleted my R-installation, then reinstalled it.
--> R 4.1.2 GUI 1.77 High Sierra build (8007)

In R:

install.packages('remotes', dependencies=TRUE, verbose=TRUE)
remotes::install_version("Rttf2pt1", version = "1.3.8")
extrafont::font_import()
fonts() --> returns fonts as expected

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.