Hi, Has anyone else run into this weird behaviour where the text in the plots created using Cairo are always italicized. For example, library(Cairo) Cairo(file='cairo_created', type='pdf', dpi=100) plot(1:10) dev.off() This produces the following attached 'cairo_created.pdf' graph. Notice how the text is italicized. The same code but using pdf() as the graphics device: pdf(file='pdf_created.pdf') plot(1:10) dev.off() Produces the attached 'pdf_created.pdf' graph in which the text is non-italicized. I am unable to find out what the difference is here and set the Cairo() function to produce non-italicized text in my graphs. Both graphic devices appear to default to Helvetica. Anyone have any suggestions? Thanks, Fong <fongchun at interchange.ubc.ca> -------------- next part -------------- A non-text attachment was scrubbed... Name: cairo_created.pdf Type: application/pdf Size: 6985 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111019/b3514526/attachment.pdf> -------------- next part -------------- A non-text attachment was scrubbed... Name: pdf_created.pdf Type: application/pdf Size: 12997 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111019/b3514526/attachment-0001.pdf>
Am 19.10.2011 17:33, schrieb Fong Chun Chan:> Hi, > > Has anyone else run into this weird behaviour where the text in the plots > created using Cairo are always italicized. For example, > > library(Cairo) > Cairo(file='cairo_created', type='pdf', dpi=100) > plot(1:10) > dev.off() > > This produces the following attached 'cairo_created.pdf' graph. Notice how > the text is italicized. The same code but using pdf() as the graphics > device: > > pdf(file='pdf_created.pdf') > plot(1:10) > dev.off() > > Produces the attached 'pdf_created.pdf' graph in which the text is > non-italicized. I am unable to find out what the difference is here and set > the Cairo() function to produce non-italicized text in my graphs. Both > graphic devices appear to default to Helvetica. > > Anyone have any suggestions?Here on Win 7 and R 2.13.0 and Cairo 1.5-0 it was not possible to reproduce it, the plot produced on my computer with your code came with plain text, not italicized... Which plattform are you on? Did you try CairoFonts? regards, Albin -- | Albin Blaschka, Mag.rer.nat. | Etrichstrasse 26, A-5020 Salzburg | * www.albinblaschka.info * www.thinkanimal.info * | - It's hard to live in the mountains, hard but not hopeless!