On 10/3/07, Paul Murrell <[EMAIL PROTECTED]> wrote: > > With the following code: > > > > pdf(file="figure.pdf",family="URWPalladio") > > plot(0,0,type="n") > > text(0,0,expression(integral(f(x)*dx, a, b))) > > dev.off() > > > > the integral symbol gets horrible. With other fonts, the same does not > > occur. Is there some way of using Palatino-like fonts with a nice > > integral symbol? I am using R 2.5.1 on F7 (Linux). > > > That could just be your viewer not being able to find the font (which is > what happens to me on this example). Try using embedFonts(), like this ... > > embedFonts("figure.pdf") > > ... which, if it succeeds, will place the fonts in the PDF and the > viewer should be happy. > > If that does not work, a workaround is to specify a different symbol > font, like this ... > > mypal <- Type1Font("URWPalladio", > c("p052003l.afm", "p052004l.afm", > "p052023l.afm", "p052024l.afm", > "Symbol.afm")) > pdfFonts(mypal=mypal) > pdf(file="figure.pdf",family="mypal") > plot(0,0,type="n") > text(0,0,expression(integral(f(x)*dx, a, b))) > dev.off()
Thanks, Paul. The command 'embedFonts("figure.pdf")' does the trick. Thanks further for having written a so useful book: "R Graphics". Paul ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.