Re: [R] Should this PDF render correctly without font embedding?

From: Ted Harding <>
Date: Thu, 24 Jul 2008 22:08:59 +0100 (BST)

On 24-Jul-08 20:29:09, Jeffrey Horner wrote:
> A professor here at Vanderbilt sent me the following code. Each of the
> text strings should right justify against the center vertical bar, but
> because of font issues it doesn't. I understand that there are
> workarounds, but I was just curious if this was consistent across all
> platforms. On linux with R 2.7.1 and R-trunk (r46103), both acrobat
> reader 8 and kpdf render it incorrectly. How about Mac or Windows? Is
> this a platform config issue, or something else?
> pdf('temp.pdf', width=11, height=8.5)
> plot(0,0,xlim=c(0,1),ylim=c(0,1),type='n')
> abline(v=.5)

># pos=2 is for right-alignment

> text(0.5,0.9, 'Yo', pos=2)
> text(0.5,0.8, 'Yo Yo', pos=2)
> text(0.5,0.7, 'Yo Yo Yo', pos=2)
> text(0.5,0.6, 'Yo Yo Yo Yo', pos=2)
> text(0.5,0.5, 'Yo Yo Yo Yo Yo', pos=2)
> text(0.5,0.4, 'Yo Yo Yo Yo Yo Yo', pos=2)
> text(0.5,0.3, 'Yo Yo Yo Yo Yo Yo Yo', pos=2)
> Jeff

Interestingly (Debian Linux, R 2.7.1), while I get the same as you with acrobat reader and (after printing to file as I also get the same when I view this PostScript file with gnome-gv, if instead I send the plot to the postscript device in the first place, i.e. the first line is

  postscript('', width=11, height=8.5)

then when I view this in gnome-gv the slignment is perfect!

Best wishes,

E-Mail: (Ted Harding) <> Fax-to-email: +44 (0)870 094 0861
Date: 24-Jul-08                                       Time: 22:08:56
------------------------------ XFMail ------------------------------

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 Jul 2008 - 21:14:35 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 Jul 2008 - 21:33:05 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive