[R] Arial for pdf() on a Mac

Steve Bellan sbellan at berkeley.edu
Wed Sep 30 06:58:26 CEST 2009


Hi,

I'd like to use Arial for the font in the PDF's and TIFF's I produce  
in R on my Mac (running 10.5.5).  I've found the following archived  
help file on how to do it in Linux (http://tolstoy.newcastle.edu.au/R/e4/help/08/08/19847.html 
) but don't understand how to do this on my system.  Are *.afm files  
freely available and do they come with the *.enc file that Type1Font()  
requires? if so where? Or do I convert some files I already have to  
*.afm?  I've searched around for useful info without much luck.

And once I have the *.afm's & an *.enc am I correct in assuming that I  
put them in the library/grDevices/afm directory and run the following  
in R:

Arial <- Typ1Font("Arial", c("4-5 afm files here"), encoding = "enc  
file here")

pdf(..., family="Arial")


Thanks for your help,

Steve Bellan
MPH, Epidemiology
PhD Candidate, Environmental Science, Policy & Management
University of California, Berkeley




More information about the R-help mailing list