[R] Printing Central European characters

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Sep 24 14:07:13 CEST 2001


Does your printer have CE versions of the fonts you are using (here
Helevetica, I think)?  This will only work if it does, and that's
not an R issue.  Printers with Adobe engines sold in the UK do not.

You may well need to switch to, say, the URW clone of Helvetica
(as gv works, that probably does have the characters) *and* use the
appropriate afms.  You will need to arrange to download them too.

n019003l.afm seems to contain the chars.

On Mon, 24 Sep 2001, Barta Zoltan wrote:
>
>
> Dear R-users,
>
> I have problems with printing Central European (CE) characters
> (e.g. {\H o} and {\H u}) in graphics made by R.
>
> After executing the following code I can see the CE characters with gv
> on my screen, but I cannot print them on a postscript printer.
>
> > postscript(file="proba.ps",enc="ISOLatin2.enc")
> > plot(0:15,0:15,type="n")
> > grid(15,15,lty=1)
> > for(i in c(32:127, 160:255)){x <- i %%16;y <- i%/% 16;points(x,y,pch=i)}
> There were 50 or more warnings (use warnings() to see the first 50)
> > warnings()
> Warning messages:
> 1: font width unknown for character 127
> 2: font metrics unknown for character 127
> 3: font width unknown for character 127
> 4: font width unknown for character 160
> 5: font metrics unknown for character 160
> 6: font width unknown for character 160
> 7: font width unknown for character 161
> 8: font metrics unknown for character 161
> 9: font width unknown for character 161
> [...]
> > dev.off()
> X11
>   2
> > version
>          _
> platform i386-pc-linux-gnu
> arch     i386
> os       linux-gnu
> system   i386, linux-gnu
> status
> major    1
> minor    3.1
> year     2001
> month    08
> day      31
> language R
>
> Note, I have problems with characters for which a warning of 'font
> width unknown for...'  printed. These characters are also not centered
> on the grid in gv display.

Char 127 is not defined, 160 is a non-breaking space but I suspect you
mean some later ones.

They will not be centred if they are not in the afms: and then they
are probably not in the Adobe fonts.

> From latex there is no problem to print CE
> characters. \psfrag also works fine.

They may well be downloading fonts.

-- 
Brian D. Ripley,                  ripley at 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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list