[R-SIG-Mac] Font Families and Cairo
Fong Chun Chan
fongchun at interchange.ubc.ca
Thu Oct 20 06:13:56 CEST 2011
Thanks for the reply. My bad on the forgetting to post my OS and
other minimum information. I'll make sure to review it before I post
next time.
I've turned it to plain text in my gmail hopefully that circumvents
the html issue.
Fong
On Wed, Oct 19, 2011 at 9:05 PM, Prof Brian Ripley
<ripley at stats.ox.ac.uk> wrote:
>
> On Wed, 19 Oct 2011, Fong Chun Chan wrote:
>
>> Hi,
>>
>> I've been searching around the web and I found this thread which discusses
>> exactly the same problem that I am facing when using Cairo on my Mac. When
>
> Oh you are using a Mac! You failed to say that in
> https://stat.ethz.ch/pipermail/r-help/2011-October/293119.html
> (and you are still not giving the 'at a minimum' information required in the posting guide).
>
>> I use the following code:
>>
>> library(Cairo)
>> Cairo(file='cairo_created', type='pdf', dpi=100)
>> plot(1:10)
>> dev.off()
>>
>> This produces a pdf with the text italicized. The same code but using pdf()
>> as the graphics device:
>>
>> pdf(file='pdf_created.pdf')
>> plot(1:10)
>> dev.off()
>>
>> Creates a text without italics. According to Simon, a work around could be
>> achieved by doing the following:
>>
>> CairoFonts("Arial:style
>> =Regular","Arial:style=Bold","Arial:style=Italic","Helvetica","Symbol")
>>
>> But from my understanding this just replaces the Helvetica font with the
>> Arial font. Is there a solution that works if I still want to use
>> Helvetica?
>
> Well, you already told us one: use pdf().
>
> You could also use R's built-in cairo_pdf() device (which has some bug fixes not in the Cairo package).
>
>> Thanks,
>>
>> Fong
>>
>> [[alternative HTML version deleted]]
>
> It also asked you not to send HTML.
>
> --
> 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 272866 (PA)
> Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-SIG-Mac
mailing list