[R-lang] Re: Including IPA fonts in plots?

Adam Albright albright@mit.edu
Tue Oct 5 16:29:05 PDT 2010


I've always had success by including a 'family' argument, to make sure I'm using a font that includes unicode, e.g.,: 

plot(1:2,1:2)
text(1.5,1.5,"ʌ",family="DoulosSIL")

--Adam



On Oct 5, 2010, at 6:58 PM, Levy, Roger wrote:

> Hi all,
> 
> Has anyone had unqualified success in rendering IPA symbols in R?  graphs I've had trouble; within the R.app GUI on OS X, the commands
> 
>> plot(1:2,1:2)
>> text(1.5,1.5,"ʌ") # in case it's not rendered properly in your email client, the character is the wedge in UTF-8
> 
> give just a box, and I get even worse failure if I try to create a Postscript or PDF file:
> 
>> postscript("test.ps") # same error ensues if I use pdf("test.pdf") here instead
>> plot(1:2,1:2)
>> text(1.5,1.5,"ʌ")
> Warning messages:
> 1: In text.default(1.5, 1.5, "ʌ") :
>  conversion failure on 'ʌ' in 'mbcsToSbcs': dot substituted for <ca>
> 2: In text.default(1.5, 1.5, "ʌ") :
>  conversion failure on 'ʌ' in 'mbcsToSbcs': dot substituted for <8c>
> 3: In text.default(1.5, 1.5, "ʌ") :
>  font metrics unknown for Unicode character U+028c
> 4: In text.default(1.5, 1.5, "ʌ") :
>  conversion failure on 'ʌ' in 'mbcsToSbcs': dot substituted for <ca>
> 5: In text.default(1.5, 1.5, "ʌ") :
>  conversion failure on 'ʌ' in 'mbcsToSbcs': dot substituted for <8c>
> 
> Interesting, ash (æ) renders fine on all graphics devices
> 
> Any suggestions would be very welcome!
> 
> (Stefan Evert suggested a while back that IPA fonts should just work within the R.app GUI for OS X, but I haven't found this to be the case.)
> 
> Best & many thanks in advance,
> 
> Roger
> 
> --
> 
> Roger Levy                      Email: rlevy@ling.ucsd.edu
> Assistant Professor             Phone: 858-534-7219
> Department of Linguistics       Fax:   858-534-4789
> UC San Diego                    Web:   http://ling.ucsd.edu/~rlevy
> 
> 
> 
> 
> 
> 
> 
> 




More information about the ling-r-lang-L mailing list