[R] unicode&pdf font problem

tdenes at cogpsyphy.hu tdenes at cogpsyphy.hu
Thu Jan 13 13:01:51 CET 2011


Hi!

Sorry for the missing specs, here they are:
> version
               _
platform       i386-pc-mingw32
arch           i386
os             mingw32
system         i386, mingw32
status
major          2
minor          12.1
year           2010
month          12
day            16
svn rev        53855
language       R
version.string R version 2.12.1 (2010-12-16)

OS: Windows 7 (English version, 32 bit)



Note that \U0171 != ü. See
http://www.fileformat.info/info/unicode/char/171/index.htm
Anyway, I have no problem with ű (~u") and other special Hungarian
characters in my R-Gui. It is correctly displayed in the console, in
plots, etc. The problem is with the pdf conversion.

The same holds for my Ubuntu Hardy Heron system*, with exactly the same
error messages as reported in an earlier thread
http://www.mail-archive.com/r-help@r-project.org/msg89792.html
As far as I know, Hershey fonts do not contain \U0171.


Regards,
Denes

* The specs of Ubuntu:
> version
               _
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          12.0
year           2010
month          10
day            15
svn rev        53317
language       R
version.string R version 2.12.0 (2010-10-15)


>
> On Jan 12, 2011, at 11:11 PM, tdenes at cogpsyphy.hu wrote:
>
>>
>> Dear List,
>>
>> I would like to print a plot into pdf. The problem is that the
>> character
>> \U0171 is replaced by a simple 'u' (i.e. without accents) in the pdf
>> file.
>>
>> Example:
>> # this works fine
>> plot(1,type="n")
>> text(1,1,"print \U0171")
>>
>> # this fails
>> pdf("trial.pdf")
>> plot(1,type="n")
>> text(1,1,"print \U0171")
>> dev.off()
>
> Have you tried:
>
> pdf("trial.pdf")
> plot(1,type="n")
> text(1,1,"print ü")
> dev.off()
>
> Your default screen fonts may not be the same as your default pdf
> fonts. A lot depends on system specifics, none of which have you
> provided.
>
>
>>
>> I found an earlier post at
>> http://www.mail-archive.com/r-help@r-project.org/msg65541.html, but
>> it is
>> too hard to understand at my R-level. Any help is appreciated.
>
>
>
> David Winsemius, MD
> West Hartford, CT
>
>



More information about the R-help mailing list