Re: [Rd] One possible cause for incorrect symbols in X11() output
On 19/08/10 09:55 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: There have been spasmodic reports of symbols such as pi and infinity in plotmath being reproduced incorrectly on the X11 device on some Linux systems (at least Ubuntu 10 and Fedora 12/13), and we've managed to track down one cause whilst investigating PR#14355. Some systems have Wine and hence the Wine symbol font installed. 'fontconfig', which is used by cairographics in X11(type='cairo') and many other applications, prefers the Wine symbol font to the standard Type 1 URW font, and seems to misinterpret its encoding. You may well have Wine installed without realizing it (as I did) -- it is increasingly common as a dependency of other software. The best test is to run % fc-match symbol s05l.pfb: Standard Symbols L Regular This is the result on a system without Wine: if you see % fc-match symbol symbol.ttf: Symbol Regular This seems to be the case with MacOS (10.6.4): $ uname -a Darwin lettu-2.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 $ fc-match symbol Symbol.ttf: Symbol 標準體 The X11(type = 'cairo') shows the problem with example(points); TestChars(font=5). However, there is no problem with the default device (quartz), nor with the default X11() which has type = 'Xlib' (unlike documented in ?X11: 'cairo' is available but 'Xlib' still used). What ever this is worth of (if this is worthless, I'll surely hear about it). Cheers, Jari Oksanen __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Aug 19, 2010, at 9:15 AM, Jari Oksanen wrote: The X11(type = 'cairo') shows the problem with example(points); TestChars(font=5). However, there is no problem with the default device (quartz), nor with the default X11() which has type = 'Xlib' (unlike documented in ?X11: 'cairo' is available but 'Xlib' still used). What ever this is worth of (if this is worthless, I'll surely hear about it). Well, maybe not worthless, but the X11 setup on Mac is poor in general. type=Xlib appears plainly not to work, and even disregarding the pi issue, the rotated y-axis labels come out pretty ugly. This is why quartz is now the default on OSX. BTW, it seems that the standard X11 Symbol,Regular font is simply absent on OSX. I can't get fc-match to list it, anyway. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Thu, 19 Aug 2010, peter dalgaard wrote: On Aug 19, 2010, at 9:15 AM, Jari Oksanen wrote: The X11(type = 'cairo') shows the problem with example(points); TestChars(font=5). However, there is no problem with the default device (quartz), nor with the default X11() which has type = 'Xlib' (unlike documented in ?X11: 'cairo' is available but 'Xlib' still used). What ever this is worth of (if this is worthless, I'll surely hear about it). Well, maybe not worthless, but the X11 setup on Mac is poor in general. type=Xlib appears plainly not to work, and even disregarding the pi issue, the rotated y-axis labels come out pretty ugly. This is why quartz is now the default on OSX. The even more serious issue under cairo of confusing style and weight is discussed on ?X11. BTW, it seems that the standard X11 Symbol,Regular font is simply absent on OSX. I can't get fc-match to list it, anyway. R's X11(type='cairo') device is using a version of cairographics compiled by Simon which includes a static build of fontconfig. So it is not really 'OSX'! I'm guessing you are using /usr/local/bin/fc-match which AFAIK also Simon's. It is also not using pango, and so not selecting fonts the same way as on Linux. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On 19/08/10 14:04 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: OSX. I can't get fc-match to list it, anyway. R's X11(type='cairo') device is using a version of cairographics compiled by Simon which includes a static build of fontconfig. So it is not really 'OSX'! I'm guessing you are using /usr/local/bin/fc-match which AFAIK also Simon's. $ which fc-match /usr/X11/bin/fc-match There seems to be no fc-match in /usr/local/bin/ in my Mac, so no Simon's utilities. (But this is, of course, pretty irrelevant for the main subject, and it seems that my installation of Ubuntu 10.04 is not affected by the problem but has quite regular fonts -- no Wine today. Better that I shut up). Cheers, Jari Oksanen It is also not using pango, and so not selecting fonts the same way as on Linux. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Thu, 2010-08-19 at 07:55 +0100, Prof Brian Ripley wrote: There have been spasmodic reports of symbols such as pi and infinity in plotmath being reproduced incorrectly on the X11 device on some Linux systems (at least Ubuntu 10 and Fedora 12/13), and we've managed to track down one cause whilst investigating PR#14355. Some systems have Wine and hence the Wine symbol font installed. 'fontconfig', which is used by cairographics in X11(type='cairo') and many other applications, prefers the Wine symbol font to the standard Type 1 URW font, and seems to misinterpret its encoding. You may well have Wine installed without realizing it (as I did) -- it is increasingly common as a dependency of other software. The best test is to run % fc-match symbol s05l.pfb: Standard Symbols L Regular This is the result on a system without Wine: if you see % fc-match symbol symbol.ttf: Symbol Regular you at least potentially have the problem. A good test is to look at ?points and run the function TestChars() defined there as TestChars(font=5) If you do have the problem, a workaround is to add the following lines to ~/.fonts.conf or /etc/fonts/local.conf (which you may need to create): match target=pattern test name=familystringSymbol/string/test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match and repeat the fc-match test to check that it worked. Hi, I tried the suggested change to ~/.fonts.conf but am getting an error from fontconfig: $ fc-match symbol Fontconfig error: ~/.fonts.conf, line 10: junk after document element s05l.pfb: Standard Symbols L Regular $ cat ~/.fonts.conf match target=pattern test name=family stringSymbol/string /test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match alias binding=same familyZapfDingbats/family acceptfamilyDingbats/family/accept /alias I have an alias in there to solve the q symbol being used in Evince etc in place of pch == 1. Am I inserting this incorrectly? Many thanks, G (This workaround was culled from https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/551977 ) -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
If you have more than one element in a fonts.conf file you need to group them, e.g. fontconfig match target=pattern test name=familystringSymbol/string/test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match alias binding=same familyZapfDingbats/family acceptfamilyDingbats/family/accept /alias /fontconfig On Thu, 19 Aug 2010, Gavin Simpson wrote: On Thu, 2010-08-19 at 07:55 +0100, Prof Brian Ripley wrote: There have been spasmodic reports of symbols such as pi and infinity in plotmath being reproduced incorrectly on the X11 device on some Linux systems (at least Ubuntu 10 and Fedora 12/13), and we've managed to track down one cause whilst investigating PR#14355. Some systems have Wine and hence the Wine symbol font installed. 'fontconfig', which is used by cairographics in X11(type='cairo') and many other applications, prefers the Wine symbol font to the standard Type 1 URW font, and seems to misinterpret its encoding. You may well have Wine installed without realizing it (as I did) -- it is increasingly common as a dependency of other software. The best test is to run % fc-match symbol s05l.pfb: Standard Symbols L Regular This is the result on a system without Wine: if you see % fc-match symbol symbol.ttf: Symbol Regular you at least potentially have the problem. A good test is to look at ?points and run the function TestChars() defined there as TestChars(font=5) If you do have the problem, a workaround is to add the following lines to ~/.fonts.conf or /etc/fonts/local.conf (which you may need to create): match target=pattern test name=familystringSymbol/string/test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match and repeat the fc-match test to check that it worked. Hi, I tried the suggested change to ~/.fonts.conf but am getting an error from fontconfig: $ fc-match symbol Fontconfig error: ~/.fonts.conf, line 10: junk after document element s05l.pfb: Standard Symbols L Regular $ cat ~/.fonts.conf match target=pattern test name=family stringSymbol/string /test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match alias binding=same familyZapfDingbats/family acceptfamilyDingbats/family/accept /alias I have an alias in there to solve the q symbol being used in Evince etc in place of pch == 1. Am I inserting this incorrectly? Many thanks, G (This workaround was culled from https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/551977 ) -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Thu, 2010-08-19 at 12:36 +0100, Prof Brian Ripley wrote: If you have more than one element in a fonts.conf file you need to group them, e.g. Many thanks, Prof. Ripley. That is working just fine now on my Fedora 12 workstation. All the best, G fontconfig match target=pattern test name=familystringSymbol/string/test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match alias binding=same familyZapfDingbats/family acceptfamilyDingbats/family/accept /alias /fontconfig On Thu, 19 Aug 2010, Gavin Simpson wrote: On Thu, 2010-08-19 at 07:55 +0100, Prof Brian Ripley wrote: There have been spasmodic reports of symbols such as pi and infinity in plotmath being reproduced incorrectly on the X11 device on some Linux systems (at least Ubuntu 10 and Fedora 12/13), and we've managed to track down one cause whilst investigating PR#14355. Some systems have Wine and hence the Wine symbol font installed. 'fontconfig', which is used by cairographics in X11(type='cairo') and many other applications, prefers the Wine symbol font to the standard Type 1 URW font, and seems to misinterpret its encoding. You may well have Wine installed without realizing it (as I did) -- it is increasingly common as a dependency of other software. The best test is to run % fc-match symbol s05l.pfb: Standard Symbols L Regular This is the result on a system without Wine: if you see % fc-match symbol symbol.ttf: Symbol Regular you at least potentially have the problem. A good test is to look at ?points and run the function TestChars() defined there as TestChars(font=5) If you do have the problem, a workaround is to add the following lines to ~/.fonts.conf or /etc/fonts/local.conf (which you may need to create): match target=pattern test name=familystringSymbol/string/test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match and repeat the fc-match test to check that it worked. Hi, I tried the suggested change to ~/.fonts.conf but am getting an error from fontconfig: $ fc-match symbol Fontconfig error: ~/.fonts.conf, line 10: junk after document element s05l.pfb: Standard Symbols L Regular $ cat ~/.fonts.conf match target=pattern test name=family stringSymbol/string /test edit name=family mode=prepend binding=same stringStandard Symbols L/string /edit /match alias binding=same familyZapfDingbats/family acceptfamilyDingbats/family/accept /alias I have an alias in there to solve the q symbol being used in Evince etc in place of pch == 1. Am I inserting this incorrectly? Many thanks, G (This workaround was culled from https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/551977 ) -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Aug 19, 2010, at 1:04 PM, Prof Brian Ripley wrote: On Thu, 19 Aug 2010, peter dalgaard wrote: On Aug 19, 2010, at 9:15 AM, Jari Oksanen wrote: The X11(type = 'cairo') shows the problem with example(points); TestChars(font=5). However, there is no problem with the default device (quartz), nor with the default X11() which has type = 'Xlib' (unlike documented in ?X11: 'cairo' is available but 'Xlib' still used). What ever this is worth of (if this is worthless, I'll surely hear about it). Well, maybe not worthless, but the X11 setup on Mac is poor in general. type=Xlib appears plainly not to work, and even disregarding the pi issue, the rotated y-axis labels come out pretty ugly. This is why quartz is now the default on OSX. The even more serious issue under cairo of confusing style and weight is discussed on ?X11. BTW, it seems that the standard X11 Symbol,Regular font is simply absent on OSX. I can't get fc-match to list it, anyway. R's X11(type='cairo') device is using a version of cairographics compiled by Simon which includes a static build of fontconfig. So it is not really 'OSX'! I'm guessing you are using /usr/local/bin/fc-match which AFAIK also Simon's. Actually, it was /opt/local/bin/fc-match (macPorts?). I have _three_ of them: peter-dalgaards-iMac:~ pd$ ls -l /usr/X11/bin/fc-match -rwxr-xr-x 1 root wheel 64416 Feb 11 2010 /usr/X11/bin/fc-match peter-dalgaards-iMac:~ pd$ ls -l /usr/local/bin/fc-match -rwxr-xr-x@ 1 root wheel 1476560 Oct 21 2008 /usr/local/bin/fc-match peter-dalgaards-iMac:~ pd$ ls -l /opt/local/bin/fc-match -rwxr-xr-x 2 root admin 14792 Mar 16 16:52 /opt/local/bin/fc-match Doesn't look like they are behaving any different, though. It is also not using pango, and so not selecting fonts the same way as on Linux. You're assuming (in fact, correctly) that I was using Simon's build, but my locally built version is similar. That doesn't appear to use pango either; I have a Portfile for pango-devel, but it must have failed to build. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] One possible cause for incorrect symbols in X11() output
On Aug 19, 2010, at 1:55 PM, peter dalgaard wrote: It is also not using pango, and so not selecting fonts the same way as on Linux. You're assuming (in fact, correctly) that I was using Simon's build, but my locally built version is similar. That doesn't appear to use pango either; I have a Portfile for pango-devel, but it must have failed to build. Actually, it builds, but the resulting R crashes on x11();plot(0) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel