Skip to content

Non-english fonts in plots

3 messages · Michal Bojanowski, Brian Ripley

#
Hello to all

I've got a question concerning use of fonts while making plots in R. I
wanted to know if it is possible for me to use polish letters in functions
like text() title() etc. Looked up characters, which can be obtained via
Hershey(), but there are none of them.

I made plots using postscript(), pdf() or png() device to export them to
MSWord or LaTeX.

Windows ANSI CE #dec codes of polish letters
? 140
? 156
? 143
? 159
? 165
? 185
? 175
? 191
? 202
? 234
? 209
? 241
? 211
? 243
? 198
? 230
? 163
? 179

Anyone of you R-wizards know how it can be done, please help.


Michal Bojanowski
#
On Fri, 15 Mar 2002, Michal Bojanowski wrote:

            
[...]

Which doesn't help at all on most other machines, as your email isn't in
Windows ANSI as defined in my Microsoft docs.  It says the message is in
iso-8859-2, that is ISO latin2.

You should be able to do this by specifying a suitable `encoding' argument
to postscript() or pdf(), and png() should just do it on a Windows machine
in a Polish locale.  Also the Windows screen device should work in any
locale and use the native encoding, so the first thing to try is plotting
on-screen.

What I understand to be Polish letters are not in WinAnsi as defined by
Adobe.  They are in ISOLatin2, and you may be able to use that, or use it
as a starting point for the encoding you have.  There is fairly extensive
documentation on the help page for postscript, and a cross-reference from
?pdf.

Note that for postscript in particular the characters have to be in the
fonts you are using, and we've met problems with Adobe fonts not covering
all of ISO latin2 before now.  You may need to use the URW ones.
#
Thank you for the reply prof. Ripley, but...

The on-screen plotting do not work. Don't know why, but can't even type
polish letters in the console.
Some of them work, but only a few of them. Those which do not, cause system
error. What is the reason
for that?

For plotting using postscript() i guess I don't have enough knowledge of
Postscript etc. to that by myself.

Anyway thank you again

Michal