Re: [gtk-list] Re: Text 1 pixel low in clist




"Neil Hodgson" <neilh@hare.net.au> writes:

>     I wrote,
> 
> >    It looks to me as though GTK+'s clist (1.2.6) is displaying text 1
> pixel
> > below where it should be.
> 
>    Further investigation shows that the problem is that the ascent and
> descent fields of GdkFont are sometimes smaller what is actually covered by
> the characters when drawn and also the ascent and descent returned by
> 
>  gdk_string_extents(font_.id, "ÂÃÅÄ(){}g",
>                     &lbearing, &rbearing, &width, &ascent, &descent);
> 
>    I have played with the configuration of the font server, xfstt, and have
> moved the problem out of some sizes only for it to reappear in other sizes.
> 
>    Are the GdkFont fields meant to be used this way or are they an
> approximation that normally gives OK results?

The ascent and descent in the GdkFont structure are the "logical" ascent
and descent of the font. That is, they are values specified by the
font designer intended for determining spacing. It is not required
that all characters fall strictly within these bounds, but it would
generally be expected for all but a special cases (such as accented
capitals.)

See 'man XFontStruct' for definitions.

>    Or is this all a bug in the font server?

It's hard to tell; one would have to look at the values for the logical
spacing of the font given in the TrueType font and then compare that
with the values that font seerver X is reporting to X.

Regards,
                                               Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]