Re: [Rd] italic (PR#7932)

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Wed 15 Jun 2005 - 15:30:10 GMT

On 6/15/05, ripley@stats.ox.ac.uk <ripley@stats.ox.ac.uk> wrote:
> On Wed, 15 Jun 2005 ligges@statistik.uni-dortmund.de wrote:
>
> > ggrothendieck@gmail.com wrote:
> >
> >> Full_Name: G. Grothendieck
> >> Version: R version 2.1.0, 2005-05-14
> >> OS: Windows XP
> >> Submission from: (NULL) (216.59.254.207)
> >>
> >>
> >> This code:
> >>
> >>
> >>> plot(1:10)
> >>> text(5,5,lab=expression(italic(22*"33")))
> >
> > For mathematical non-character-string annotation a math font is used
> > that does not support italic/bold/bolditalic/plain.
> > It seems to be worth adding this information to ?plotmath, such as:
> > "(only for characters, but not for math font)".
>
> I don't think that is true: plotmath uses the same 5 fontfaces as any
> other form of graph annotation. The reason was staring Grothendieck
> in the face: the code is
>
> static BBOX RenderNumber(SEXP expr, int draw, mathContext *mc,
> R_GE_gcontext *gc, GEDevDesc *dd)
> {
> BBOX bbox;
> FontType prevfont = SetFont(PlainFont, gc);
> bbox = RenderStr(CHAR(asChar(expr)), draw, mc, gc, dd);
> SetFont(prevfont, gc);
> return bbox;
> }
>
> so it is by design. Numeric constants are always in PlainFont.

What is the rationale this?



R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Jun 16 01:31:44 2005

This archive was generated by hypermail 2.1.8 : Mon 24 Oct 2005 - 22:27:19 GMT