[R] X11 fonts and Ubuntu

Rich FitzJohn rich.fitzjohn at gmail.com
Sun Dec 17 10:51:46 CET 2006


Hi,

I have observed this as well (Debian etch, R 2.4.0), with "small" cex
values when drawing text.

My LANG environment variable was set to "en_NZ.UTF-8"; setting this to
"C" or "en_NZ" seems to prevent the error occuring.  I presume my
installation is missing a few fonts, yours may be too.

HTH,
Rich

 Setting the environment variable LANG=C before running R seems to
work as a workaround (normally this is en_NZ.UTF-8

On 12/17/06, Patrick Giraudoux <patrick.giraudoux at univ-fcomte.fr> wrote:
> Hi,
>
> I am moving from Windows XP to Ubuntu 6.10 and installed R 2.4.0. When I
> run eg plot.lm  (things work fine with plot.default - eg
> plot(rnorm(30),rnorm(30)))
>
> plot(lmobject)
>
> I can get the first plot and then this message:
>
> Hit <Return> to see next plot:
> Error in text.default(x, y, labels.id[ind],cex=cex, xpd=TRUE, :
>     could not find any X11 fonts
> Check that the Font Path is correct
>
> I have googled through the R-help list and it seems that such troubles
> already occured sometimes (see link below and threads)
>
> http://lists.freebsd.org/pipermail/freebsd-ports/2005-June/024091.html
> http://tolstoy.newcastle.edu.au/R/help/06/03/23864.html
>
> but did not find solution. Some messages claim it is a X11 problem (not
> R) some others suggest it may come from R. Some also mention that UTF-8
> may be a problem (though I don't have specific message on this from R).
> I have re-installed x11-common via the Synaptic package manager (so I
> suppose X11 is well installed) without improvement. I have checked
> /etc/X11/ xorg.conf
>
> Section "Files"
>     FontPath "/usr/share/X11/fonts/misc"
>     FontPath "/usr/share/X11/fonts/100dpi/:unscaled"
>     FontPath "/usr/share/X11/fonts/75dpi/:unscaled"
>     FontPath "/usr/share/X11/fonts/Type1"
>     FontPath "/usr/share/X11/fonts/100dpi"
>     FontPath "/usr/share/X11/fonts/75dpi"
>     FontPath "/usr/share/fonts/X11/misc"
>     FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
> Endsection
>
> but cannot identify where the problem is actually thus no remedy.
>
> Any idea?
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>


-- 
Rich FitzJohn
rich.fitzjohn <at> gmail.com



More information about the R-help mailing list