Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

font_import() is missing some fonts #75

Open
GGnanadesikan opened this issue May 24, 2020 · 2 comments
Open

font_import() is missing some fonts #75

GGnanadesikan opened this issue May 24, 2020 · 2 comments

Comments

@GGnanadesikan
Copy link

I installed some new truetype fonts that I wanted to use (and they work fine in MS Word), but font_import() skips right over it. I've also tried specifying the path and specifying the filename with the pattern argument. No luck.

I just get the following error:
Error in data.frame(fontfile = ttfiles, FontName = "", stringsAsFactors = FALSE) :
arguments imply differing number of rows: 0, 1

I also tried resetting the database and importing everything again, and it skips right over them.

@MaximilianR
Copy link

Try this, but change "XXX" to your Windows username:

font_import(paths = "C:/Users/XXX/AppData/Local/Microsoft/Windows")

@kulbhushanchand
Copy link

kulbhushanchand commented Feb 22, 2021

Adding to above answer -

Fonts installed for all users goes to - C:/Windows/Fonts/
Fonts installed for single user goes to - C:/Users/XXX/AppData/Local/Microsoft/Windows/Fonts/ (where XXX is Windows Username)

Solution -

  • font_import(paths = "C:/Users/XXX/AppData/Local/Microsoft/Windows")
    OR
  • Go to C:/Users/XXX/AppData/Local/Microsoft/Windows", select all, right-click, select Install for all users, and in R use extrafonts::font_import()

PS: The first method is faster because of relatively fewer fonts in C:/Users/XXX/AppData/Local/Microsoft/Windows than in C:/Windows/Fonts/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants