[R] using LaTeX-fonts with R

bert stumm bert.stumm at gmx.de
Tue Jan 15 14:47:25 CET 2008


Hi,

I try to use the sfrm1000.pfb Type-1 font with my postscript plots. When I
add family=CM to the postscript() command the output is empty. What am I
doing wrong?

# define font
CM <- Type1Font('ComputerModern',                         # font ID
    c(file.path(getwd(), c('sfrm1000.afm', '', '', ''))), # font metrics
    encoding='AdobeStd');                                 # font encoding

postscript('sin.ps', family=CM);
dev.off();

I have the two files sfrm1000.afm and sfrm1000.pfb. To my knowledge the
Type-1 font is the pfb file, which I never gave explicitly. Furthermore I am
confused by the fact that I have to give 4 afm files. (sfrm1000.afm and
sfrm1000.pfb are from the latex cm-super package.)

Futhermore if someone has a HOWTO on using LaTeX fonts with R, please provide
a pointer.

Thank you in advance,
Frank

--




More information about the R-help mailing list