3
votes

I am currently working in RStudio Version 1.2.5033 I have Raleway ("Raleway.ttf") fully installed on my computer (Windows 10 OS). When I run through the standard font_import() protocol from the extrafont package, it checks through the majority of fonts on my computer, but does not import or check Raleway.

When I specifically dictate font_import("Raleway") or font_import("Raleway.ttf") I get the following error:

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

Is anyone familiar with what this problem may be? Is it a font-specific issue? Or something I am doing wrong on my end? Thank you for any help you can give.

I have already uninstalled and reinstalled the font several times, and restarted my entire computer after doing so, and had no luck.

1
I am having the exact same issue with this font and others too, did you end up finding a solution?MokeEire

1 Answers

1
votes

I've had this issue on Windows when the font is installed in the User directory. For example, if I install a new font on Windows 10, it goes to C:\Users\grego\Appdata\Local\Microsoft\Windows\Fonts\, but extrafont looks in C:\Windows\Fonts. You can check where the font is installed if you open up Fonts in the Control Panel and click on the font, there should be a "Font File" entry with the full file path.

I've had no luck getting Windows to install the font for all users through the GUI installer (though it may be as simple as dropping the TTF file in the C:\Windows\Fonts\ directory...), but pointing extrafont to the correct folder has worked: extrafont::font_import(paths = "C:/Users/grego/Appdata/Local/Microsoft/Windows/Fonts/", ...)