[R] Correct Computer Modern font in postscript(..) output

Mark Van De Vyver mvdv at spamcop.net
Mon Mar 15 21:37:33 CET 2004


Brian,
Thanks for the reponse.  I apologise if I gave the impression of being
accusatory - not my intention.  My point was that when I use italic(), in R
with ComputerModern, I get output 
different to the output I get when I use \italic in TeX/LaTex.  I'm neither
an R nor TeX pro (for want of time not interest), so I simply expected the
two to be the same.  Brian states the current output is the intended
behaviour, which is fine.
Thanks
Mark
 
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk] 
> Sent: Monday, March 15, 2004 7:12 PM
> To: Mark Van De Vyver
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] Correct Computer Modern font in postscript(..) output
> 
> 
> family="ComputerModern" gives you CMSL10, which is the 
> `correct font'. From src/main/devPS.c:
> 
>     /* Computer Modern as recoded by Brian D'Urso */
>     { "ComputerModern",
>       {"CM_regular_10.afm", "CM_boldx_10.afm", "CM_italic_10.afm",
>        "CM_boldx_italic_10.afm", "CM_symbol_10.afm"}
>     },
> 
> and CM_italic_10.afm specifies CMSL10: there is no italic 
> font in standard 
> Computer Modern, and the `correct font' is the one the 
> designer intended.
> 
> What did you think the `correct font' was?
> 
> Please do read the posting guide and its references, and try 
> to write more 
> informative (and less accusatory) messages.
> 
> 
> On Mon, 15 Mar 2004, Mark Van De Vyver wrote:
> 
> > Hi,
> > I'm trying to get the correct font used when generating 
> italic text in 
> > an R grahic.  I have a set of labels that print correctly except it 
> > seems the italic text is justr a slanted version of the TeX 
> computer 
> > modern normal font...  I'm using R v1.8.1 on Windows XP, 
> and I get the 
> > same result if I build the pdf using Adobe Acrobat or using MikTeX
> > 
> > The labels:
> > 
> > grpNames<-c(expression(paste("lo ", italic(d[n]))), 
> > expression(italic(d[n])), expression(paste("hi ", italic(d[n]))),
> >             expression(paste("lo ", italic(LM[1]))), 
> > expression(italic(LM[1])), expression(paste("hi ", italic(LM[1]))),
> >             expression(italic(d[n])), expression(italic(LM[1])),
> > expression(italic(LM[2])))
> > 
> > The postscript command:
> > 
> > postscript(file = "Rplots.ps",
> >            onefile = F, height=6,width=10,
> >            paper="a4", family="ComputerModern",bg="transparent",
> >            horizontal=F, pointsize=10,
> >            print.it=F)
> > 
> > Is this the best currently available, or is there some way 
> to get the 
> > correct font used when using italics?
> 
> Well, that is `building' a postscript file, not PDF: if you 
> want PDF you 
> should be using pdf().
> 
> 
> -- 
> 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-help mailing list