[Rd] Phonetic symbols (IPA) in R graphics
p.murrell at auckland.ac.nz
Thu Dec 14 20:34:01 CET 2006
Giampiero Salvi wrote:
> Hi Paul,
> I tried the following from your slides, perhaps you can see the
> 1) I downloaded the fonts and the encoding file into the directories
> Type1 and encodings (in my current directory)
> 2) I ran R from the same directory (ver 2.4.0)
> 3) I added the font mapping for the pdf and postscript devices:
> ipa <- Type1Font("InternationalPhoneticAlphabet",
> 4) I created a simple figure:
> Here I get 13 warnings of the type:
> "font family not found in X11 font database"
> As far as I understand this is because I defined the fonts only for
> the postscript and pdf devices.
Exactly. The process would be simpler if you drew directly to
PostScript or PDF via postscript() or pdf().
Also, the text() call should be ...
> 5) I copy the device to postscript:
> Here I get the real problem:
> Error in dev.copy(file = "whatever.eps", device = function (file =
> ifelse(onefile, :
> invalid character sent to 'PostScriptCIDMetricInfo' in a
> single-byte locale
> I googled for PostScriptCIDMetricInfo but only found a few pages in
> Japanese, can you help me?
I'm not sure how you got there. You've specified the family wrong so I
would expect more "family not found" warnings. Let me know if this
persists with the correct family specified.
> I can put the font and encoding files somewhere if necessary.
> I am working on a RedHat linux computer with locale:
> On Thu, 14 Dec 2006, Paul Murrell wrote:
>> Giampiero Salvi wrote:
>>> Hi all,
>>> I would like to add phonetic symbols in my figures. Usually I typeset
>>> my documents in LaTeX and I use the tipa  package to get
>>> International Phonetic Alphabet (IPA) fonts. So, my problem would be
>>> solved if I could insert LaTeX commands in the text() function (I
>>> guess at least).
>>> I would like to avoid using psfrag (that is, inserting a string in
>>> the eps figure and then substituting it with the right symbol with
>>> dvips) because I would like to work with pdf pictures and pdflatex
>>> as well as latex -> dvips -> ps2pdf.
>> Take a look at ...
>> Fonts, lines, and transparency in R graphics. R News, 4(2):5-9,
>> September 2004.
>> Non-standard fonts in PostScript and PDF graphics. R News, 6(2):41-47,
>> May 2006.
>>> If inserting special fonts is not possible at the moment, I would
>>> appreciate some hints on how I could go about modifying text() to
>>> include this feature. (This is why I post to r-devel instead of
>>> Thank you!
>>>  http://www.essex.ac.uk/linguistics/clmt/latex4ling/tipa/
>>> R-devel at r-project.org mailing list
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
64 9 3737599 x85392
paul at stat.auckland.ac.nz
More information about the R-devel