Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Windows (TTF) font?

Tags:

r

cairo

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?

like image 317
Karsten W. Avatar asked Jan 29 '10 15:01

Karsten W.


People also ask

Can Windows use TrueType fonts?

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.

How do I open a TTF file in Windows 10?

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 do I install a TTF file in Windows 10?

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!


1 Answers

Here is an example adapted from http://www.statmethods.net/advgraphs/parameters.html:

windowsFonts(Calibri=windowsFont("Calibri"))
par(family="Calibri")
plot(rnorm(1:10))
like image 85
Karsten W. Avatar answered Sep 28 '22 06:09

Karsten W.