I sent the message accidentally to r-help, but I intended to follow r-sig-debian because it is about the problem that Evince doesn't render symbols properly. it explains why I think the embedFonts function in R is the "magic bullet" ---------- Forwarded message ---------- From: Paul Johnson <pauljohn32 at gmail.com> Date: Mon, Jun 7, 2010 at 9:28 AM Subject: Re: [R] Wrong symbol rendering in plots (Ubuntu) To: "Eduardo J. Chica" <ejchica at gmail.com> Cc: r-help at r-project.org
On Fri, Jun 4, 2010 at 12:01 PM, Eduardo J. Chica <ejchica at gmail.com> wrote:
Hi I am having problems with the rendering of scientific symbols (mu and degree) in my plots. Whenever I use these symbols they are rendered changed (mu is changed to the proportionality symbol and degree is changed to something resembling a gamma) in the X-device. If I make a pdf of the plot and open the file in Evince or Okular symbols are also rendered wrong, however if I open the file with Xpdf or Acroread they are rendered correctly. I did not have this problem before, it arose after I upgraded both R and my system (Ubuntu karmic koala to lucid lynx), so I can not tell for sure if the problem is R-related or Ubuntu related (I have posted in a Ubuntu forum also http://ubuntuforums.org/showthread.php?t=1325289). Please let me know if you have any idea of how to fix this, or if you can confirm this is not an R-related issue.
I run Ubuntu as well and I see the same problem when I view a pdf with Evince, the default document viewer. ?In Adobe's Acorbat reader, acroread, the symbols show correctly. Here's an example pdf file: ?http://pj.freefaculty.org/linux/pm92.pdf In Evince, instead of mu, you see the proportional to symbol. In the Ubuntu bugtracker, this problem has been reported and they say it has been fixed, but I still see it. https://bugs.launchpad.net/ubuntu/+source/poppler/+bug/518236 http://art.ubuntuforums.org/showthread.php?p=9410094 I believe the problem is a mismatch between the fonts available to R and to the various viewers. ?R does not embed all fonts in the pdf files. ?Open a suspect pdf in Evince or some other viewer and check on the fonts. In Evince, under the File/Properties menu, there's a font indication. None of the fonts in R pdfs are embedded. ?There is a way to embed fonts after in R, (see ?embedFonts) but I can't understand the documentation on how to do that. But I'm testing it out. I believe that the fonts installed in the system, combined with whatever user config changes occur, make this a tough problem to solve. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas