From ggrothendieck at gmail.com  Wed Jun 15 17:30:10 2005
From: ggrothendieck at gmail.com (Gabor Grothendieck)
Date: Wed, 15 Jun 2005 11:30:10 -0400
Subject: [Rd] italic (PR#7932)
In-Reply-To: <20050615151455.6A9FAA1F9@slim.kubism.ku.dk>
References: <20050615151455.6A9FAA1F9@slim.kubism.ku.dk>
Message-ID: <971536df05061508304b37aaba@mail.gmail.com>

On 6/15/05, ripley at stats.ox.ac.uk <ripley at stats.ox.ac.uk> wrote:
> On Wed, 15 Jun 2005 ligges at statistik.uni-dortmund.de wrote:
> 
> > ggrothendieck at 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?



[Rd] italic (PR#7932)
Gabor Grothendieck