wch / extrafont

Tools for using fonts in R graphics
315 stars 48 forks source link

downloaded font should be in /Library/Fonts not in ~/Library/Fonts #57

Open EdwinTh opened 6 years ago

EdwinTh commented 6 years ago

It seems that this library is no longer maintained, still an issue so others can maybe solve this problem.

When downloading a .ttf on Mac OS, it is stored in ~/Library/Fonts. Confusingly extrafont does find the font when running font_import. After import, it is also shown when running fonts. However, it still is not available for use.

It does work when moving the .ttf file to /Library/Fonts . Apparently this is the folder extrafonts looks. Make sure to remove the .ttf file from ~/Library/Fonts and rerun the import_font.

jimjam-slam commented 6 years ago

I think I just picked up on a similar issue in Windows: Windows 10 now lets you install fonts for just the current user, as well as being able to install them for all users. extrafont doesn't appear to check for fonts in the user directory (~/../AppData/Local/Microsoft/Windows/Fonts).

It also doesn't check places used by programs like SkyFonts (~/../AppData/Roaming/Monotype/skyfonts-google).

EDIT: oh, I just realised you can give font_import() a vector of paths to scan! It seemed to find them just fine once I provided the font paths explicitly 😄