Christian Kamenik
2010-Oct-14 06:50 UTC
[R-sig-Debian] degree symbol using X11 on Xubuntu 10.04
Dear all, I am having exactly the same problem as Andy on an Intel Mac (see below / https://stat.ethz.ch/pipermail/r-sig-mac/2009-May/006208.html) with the degree symbol. I am using R version 2.11.1 (2010-05-31) on Xubuntu 10.04 with Windows fonts copied from /WINDOWS/Fonts and included via 'sudo dpkg-reconfigure fontconfig' and 'sudo fc-cache'. Any help would be highly appreciated, Christian> Howdy, > > Using the scheme in plotmath, I can no longer get the degree symbol > for my on-screen plots, using X11 on OS X. I instead see an upper-case > upsilon (I think). This is reproducible using "demo(plotmath)". A > figure drawn with this faulty symbol produces correct postscript (i.e. > with a degree symbol) when I use dev.copy to write it to an eps file. > > I'm using R version 2.8.1 Patched (2009-01-19 r47650) on an intel Mac, > fully updated OS X 10.5.7. > > Help appreciated, > > Andy > > Addendum: This question was posed on the R-Help list, and Prof Ripley > was kind enough to give me his thoughts on the problem. His suggested > work-around of X11(type="Xlib") does work. I am re-posting my > original question here at his suggestion. Prof Ripley writes: > > >/ And that's the problem, the fonts used by cairographics on Mac OS X. > />/ I don't know about the 'no longer': this (and a few others including > />/ infinity) have been faulty for some time. I think it relates to how > />/ 'fontconfig' (for which a binary library ships with R for Mac OS X) > />/ interacts with Mac fonts, but there are many more interesting things > />/ to do that track down such quirks. > />/ > />/ There are some hints about this on ?X11 > />/ > />/ X11 chooses fonts by matching to a pattern, and it is quite > />/ possible that it will choose a font in the wrong encoding or which > />/ does not contain glyphs for your language (particularly common in > />/ 'iso10646-1' fonts). > />/ > />/ This does look very like an incorrect encoding for a symbol font. > />/ OTOH, the last display in example(points) seems right, so something > />/ subtle is going on. > />/ > />/ One option is to use X11(type="Xlib"). Another is to use quartz(), > />/ assuming you are not running R on a remote system. > />/ > />/ This is an Mac-specific question and it is always worth asking such > />/ on R-sig-mac. > />/ > />/ I believe the behaviour is still the same in 2.9.0 patched, but it > />/ is always worth checking the current release, especially on > />/ platforms where components that are otherwise part of the OS ship > />/ with R (as no one records in the R docs things fixed/broken by > />/ updates to such components -- we probably don't even know half of > />/ them). > / > -- > Andy Jacobson > andy.jacobson at noaa.gov <https://stat.ethz.ch/mailman/listinfo/r-sig-mac> > > NOAA Earth System Research Lab > Global Monitoring Division > 325 Broadway > Boulder, Colorado 80305 > > 303/497-4916 > >-- ----------------------------------------------- Oeschger Centre for Climate Change Research, Institute of Geography& Institute of Plant Sciences University of Bern http://www.stomatocysts.unibe.ch/kamenik mailto: christian.kamenik@giub.unibe.ch Postal address: Dr. Christian Kamenik Institute of Geography Erlachstrasse 9a, Trakt 3 3012 Bern, Switzerland Tel. +41 (0)31 631 5091 Fax +41 (0)31 631 43 38 [[alternative HTML version deleted]]
Michael Rutter
2010-Oct-14 15:21 UTC
[R-sig-Debian] degree symbol using X11 on Xubuntu 10.04
On 10/14/2010 02:50 AM, Christian Kamenik wrote:> Dear all, > > I am having exactly the same problem as Andy on an Intel Mac (see below > / https://stat.ethz.ch/pipermail/r-sig-mac/2009-May/006208.html) with > the degree symbol. I am using R version 2.11.1 (2010-05-31) on Xubuntu > 10.04 with Windows fonts copied from /WINDOWS/Fonts and included via > 'sudo dpkg-reconfigure fontconfig' and 'sudo fc-cache'. > > Any help would be highly appreciated, Christian >I can confirm this bug but I can also confirm it works properly. I ran this code: plot(rnorm(100),main=expression(sum(x[i], i=1, n))) pdf("test.pdf") plot(rnorm(100),main=expression(sum(x[i], i=1, n))) dev.off() postscript("test.ps") plot(rnorm(100),main=expression(sum(x[i], i=1, n))) dev.off() The postscript version worked on all three systems. On 32-bit Lucid (10.04), all worked. On both 32-bit and 64-bit Maverick (10.10), the summation is returned as a dot. Working on finding a solution. Michael -- Dr. Michael A. Rutter School of Science Penn State Erie, The Behrend College Station Road Erie, PA 16563 http://math.bd.psu.edu/faculty/rutter
Michael Rutter
2010-Oct-15 02:07 UTC
[R-sig-Debian] degree symbol using X11 on Xubuntu 10.04
On 10/14/2010 02:50 AM, Christian Kamenik wrote:> Dear all, > > I am having exactly the same problem as Andy on an Intel Mac (see below > / https://stat.ethz.ch/pipermail/r-sig-mac/2009-May/006208.html) with > the degree symbol. I am using R version 2.11.1 (2010-05-31) on Xubuntu > 10.04 with Windows fonts copied from /WINDOWS/Fonts and included via > 'sudo dpkg-reconfigure fontconfig' and 'sudo fc-cache'. > > Any help would be highly appreciated, Christian >Christian, I believe the solution is: sudo apt-get remove ttf-symbol-replacement Not sure why this package is being installed, but removing this solved the problem. I had a test version of Maverick in a virtual box that was basically stock, and was able to demo(plotmath) perfectly. I started comparing package lists and this was the problem child. Michael -- Dr. Michael A. Rutter School of Science Penn State Erie, The Behrend College Station Road Erie, PA 16563 http://math.bd.psu.edu/faculty/rutter