[Rd] RE:bug 548 graphics '*' (PR#549)

Prof Brian Ripley Prof Brian Ripley <ripley@stats.ox.ac.uk>
Mon, 22 May 2000 18:36:04 +0100 (BST)


> Date: Mon, 22 May 2000 16:52:59 +0200 (CEST)
> From: Martyn Plummer <plummer@iarc.fr>
> To: ripley@stats.ox.ac.uk
> Subject: Re: [Rd] RE:bug 548 graphics '*' (PR#549)
> Cc: R-bugs@biostat.ku.dk, r-devel@stat.math.ethz.ch
> 
> On 22-May-00 ripley@stats.ox.ac.uk wrote:
> > A little more followup.  The gtk() device uses gdk_string_width to
> > find the character extents. That seems undocumented anywhere in the
> > gtk+ sources.  It is returning the maximal descent for the font for all
> > input strings on my system.  Looking at the current gtk+-1.2.7 sources it
> > appears to call XTextExtents, and that _should_ give the
> > string descent.
> > 
> > Since gdk fonts are private opaque structures I see no way around this.
> > Without any documentation I do not even know if it is a gdk bug (although
> > I suspect it is or was).  The gdk docs in gtk+ seem seriously incomplete.
> 
> 
> The best thing that can be said about the GNOME API documentation is
> that it is getting better.  Documentation on glib, gdk and gtk+ is
> available from here:
> 
> http://developer.gnome.org/doc/API/
> 
> but is still quite sparse.  
> 
> This is not, in fact, a gdk bug, but is due to a permutation in
> the arguments of gdk_string_extents in GTK_MetricInfo 
> (file src/gnome/devGTK.c). It currently reads
> 
>     gdk_string_extents(gtkd->font, tmp,
>                        &lbearing, &rbearing,
>                        &iascent, &idescent, &iwidth);
> 
> but should be
> 
>     gdk_string_extents(gtkd->font, tmp,
>                        &lbearing, &rbearing,
>                        &iwidth, &iascent, &idescent);
> 

Great, thanks, that solves it.  Now I was looking for a man page
for gdk_string_extents to find out what the arguments were supposed to mean,
but never found one.

Bug fixed for 1.1.0.

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._