Re: fonts in gtk-2.0/pango


On Mon, 2002-07-29 at 11:16, Allin Cottrell wrote:
> On 29 Jul 2002, Sven Neumann wrote:
> > > and I assumed that was what the function was returning.  But the
> > > value is wrong: it is given as 8 by
> > > pango_font_metrics_get_approximate_char_width() while in fact it is
> > > 7.  This is for Lucidatypewriter 10, where the glyphs themselves are
> > > of various widths but are all padded to give an advance of 7 pixels.
> >
> > which Pango backend did you use to obtain this result? I know that at
> > least the FT2 and Xft backends calculate the approximate char width by
> > measuring the length of an example string and dividing the result by
> > the number of characters in the string. I don't see how this could
> > lead to wrong results for a monospace fonts.
> I'll be away for a week but when I get back I'll check into this
> properly and see which backend was active.

I had a problem which I can relate to this.  Using a monospaced font in
a GtkTextView would lead to inaccurate character positions (e.g. a tab
wasn't 8 characters width, but more like 8.5) and looked really bad.  I
solved the problem upgrading freetype from 2.0.6 to 2.0.9.  Maybe this
is the case?


> Allin Cottrell.
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org

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