[Rd] unexpected behaviour of expression(sum())

Deepayan Sarkar deepayan at stat.wisc.edu
Sat Mar 12 23:39:24 CET 2005


On Friday 11 March 2005 13:13, Marc Schwartz wrote:
> On Fri, 2005-03-11 at 17:17 +0000, Prof Brian Ripley wrote:
> > I see you have both a scalable font (the first) and size-specfic
> > fonts. My guess is that the scalable font is not encoded in the
> > same way as the others: can you track down where it is coming from?
> >
> > Otherwise my list on FC3 is the same as yours (minus the
> > duplicates, which are also puzzling).  I have also just checked
> > Exceed, which has the same list plus scalable fonts (and also has
> >
> > -adobe-symbol-0-0-normal--0-0-0-0-p-0-adobe-fontspecific
> > -adobe-symbol-0-0-normal--0-0-0-0-p-0-sun-fontspecific
> > -adobe-symbol-0-0-normal--0-0-100-100-p-0-adobe-fontspecific
> > -adobe-symbol-0-0-normal--0-0-100-100-p-0-sun-fontspecific
> > -adobe-symbol-0-0-normal--0-0-75-75-p-0-adobe-fontspecific
> > -adobe-symbol-0-0-normal--0-0-75-75-p-0-sun-fontspecific
> >
> > which caused problems for 2.0.1 with getting bold symbols in some
> > sizes, hence the second bug fix I mentioned).
> >
> > As a wild guess, do you have a font server as well as local fonts?

I don't think so. My XF86Config-4 file has the line 
        FontPath        "unix/:7100"      # local font server
but I don't see any font server package actually installed, and I get 

deepayan $ xfsinfo -server localhost:7100
xfsinfo:  unable to open server "localhost:7100"

. I do have fontconfig (and a bunch of fonts all over the place), which 
may explain the duplicates.

[...]

> Deepayan, which X server is being used? FC3 (fully updated) is using
> xorg 6.8.1 if that might make a difference.

I'm using Debian testing, the version of X being 4.3.0.dfsg.1-10 (4.3.0 
with some modifications). But this is not the issue, since things work 
fine on another Debian system with the same version of X. It turns out 
that the problem is with the gsfonts-x11 package. After removing it, I 
get the correct symbols (with a warning message):

> expr = expression(sum(x, 1, n))
> plot(1, main = expr, type = "n")
> text(1, 1, expr)
Warning message:
X11 used font size 8 when 9 was requested


There's still a bug, but probably not in R. The only external indication 
I can get that something is wrong is when I compare

$ xfd -fn 
-adobe-symbol-medium-r-normal--20-140-100-100-p-107-adobe-fontspecific 

and 

$ xfd -fn 
-adobe-symbol-medium-r-normal--0-0-100-100-p-107-adobe-fontspecific

The second one claims to display 

-urw-standard symbols 
l-medium-r-normal--17-120-100-100-p-89-adobe-fontspecific

and in fact does *not* have the summation symbol. (Screenshots at 

http://www.stat.wisc.edu/~deepayan/R/xfd-fixed.png and 
http://www.stat.wisc.edu/~deepayan/R/xfd-scalable.png

). However, the file /usr/X11R6/lib/X11/fonts/Type1/fonts.dir has the 
line

s050000l.pfb -urw-standard symbols 
l-medium-r-normal--0-0-0-0-p-0-adobe-fontspecific

which suggests that the actual font used is s050000l.pfb, and a font 
editor shows that it does contain the summation symbol (U+2211). 

Deepayan



More information about the R-devel mailing list