Re: fonts in gtk-2.0/pango
- From: Allin Cottrell <cottrell wfu edu>
- To: Gustavo Giráldez <gustavo giraldez gmx net>
- Cc: Sven Neumann <sven gimp org>, <gtk-devel-list gnome org>
- Subject: Re: fonts in gtk-2.0/pango
- Date: Sun, 4 Aug 2002 23:42:42 -0400 (EDT)
On 1 Aug 2002, Gustavo Giráldez wrote:
> 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 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?
Thank you for putting me onto the right track. It was a freetype
problem for me too, but in my case the problem was that the freetype
version was too recent (version 2.1.2) rather than too old. After
installing 2.0.9 I get the correct font metrics. It would be nice if
pango's configure script gave an error message when one tries to build
against freetype 2.1.2.
Allin Cottrell.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]