[R] Postscript fonts

Erich Neuwirth erich.neuwirth at univie.ac.at
Sat Aug 5 14:14:10 CEST 2006


Thanks,

The following piece of code demonstrates a problem I still have.

pdf(file="fonttest.pdf",fonts=c("Helvetica"))
plot(1:10,main="",xlab="")
par(family="Helvetica",font=1)
title(main="Helvetica")
par(family="Helvetica",font=2)
title(sub="Helvetica-Bold")
par(family="Helvetica",font=3)
title(xlab="Helvetica-Oblique")
dev.off()

The font=  parameter seems not to be respected.
I do not get bold or italics.
What am I doing wrong or not understand here?

My original problem was that I had not understood that the
fonts parameter is absolutely necessary when opening the device
when one wants to use par(family= ).


BTW, this is R 2.3.1 on Windows XP.



Prof Brian Ripley wrote:
> > On Sat, 5 Aug 2006, Erich Neuwirth wrote:
> >
>> >> How can I find out what fonts are available for
>> >> par(family=
>> >> for the postscript device?
> >
> > This is dynamic: for the current value
> >
>> >> names(postscriptFonts())
> >  [1] "serif"                "sans"                 "mono"
> >  [4] "symbol"               "AvantGarde"           "Bookman"
> >  [7] "Courier"              "Helvetica"            "Helvetica-Narrow"
> > [10] "NewCenturySchoolbook" "Palatino"             "Times"
> > [13] "URWGothic"            "URWBookman"           "NimbusMon"
> > [16] "NimbusSan"            "URWHelvetica"         "NimbusSanCond"
> > [19] "CenturySch"           "URWPalladio"          "NimbusRom"
> > [22] "URWTimes"             "ComputerModern"
"ComputerModernItalic"
> > [25] "Japan1"               "Japan1HeiMin"         "Japan1GothicBBB"
> > [28] "Japan1Ryumin"         "Korea1"               "Korea1deb"
> > [31] "CNS1"                 "GB1"
> >
> > and for more details see the current R-News (6/2).
-- 
Erich Neuwirth, University of Vienna
Faculty of Computer Science
Computer Supported Didactics Working Group
Visit our SunSITE at http://sunsite.univie.ac.at
Phone: +43-1-4277-39464 Fax: +43-1-4277-39459



More information about the R-help mailing list