[R] Font problem

Peter Dalgaard p.dalgaard at biostat.ku.dk
Tue Dec 9 12:06:12 CET 2003


John Dougherty <jwdougherty at mcihispeed.net> writes:

> Some plots fail due to a problem with the X11 fonts.  I get a message that 
> "X11 font at size 22 could not be loaded."  The demo() graphics routine for 
> instance dies during the third chart.  The graphics demo calls "font.main=1" 
> and that seems to be where the error is.  I believe this is due to a 
> configuration problem on my system, however I can't find where in the 
> environment font.main looks for the font to use.
> 
> I am running SuSE 9.0 and use the KDE desktop.  However, I have also 
> replicated this in GNOME and WindowMaker.  Varying the fonts used by the 
> console does notb effect the result.

I think that in principle the bug is in R, but as far as I remember,
the workaround is to ensure that you either have scalable PostScript
fonts or have non-scalable versions in both 100 and 75 dpi. This in
turn is assured by configuring the font server.

On RedHat (dunno about SuSE),/etc/X11/fs/config needs to have
something like

catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
        /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/misc,
        /usr/X11R6/lib/X11/fonts/Type1,
        ...

or lose the :unscaled, but that tends to look horrible.
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list