Is it possible to use a TTF font in R?
Is the cairo package intended for this task? How would a minimal example look like?
Although TrueType fonts can be used on both the Macintosh and Windows platforms, slight differences in the way each operating system handles the fonts lead vendors to produce separate versions of the font for each platform.
In Windows 10, you can also double-click the font file to open it and select Install to install it automatically. If you have programs running while installing fonts in Windows, you may be required to exit the programs and restart the PC to make the new fonts available in the font menu.
How to Install Fonts in Windows 10. Once you have your font downloaded (often . ttf files) and available, right-click it and click Install. That's it!
Here is an example adapted from http://www.statmethods.net/advgraphs/parameters.html:
windowsFonts(Calibri=windowsFont("Calibri"))
par(family="Calibri")
plot(rnorm(1:10))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With