Re: fonts in gtk-2.0/pango
- From: Sven Neumann <sven gimp org>
- To: Allin Cottrell <cottrell wfu edu>
- Cc: gtk-devel-list gnome org
- Subject: Re: fonts in gtk-2.0/pango
- Date: 29 Jul 2002 16:07:58 +0200
Hi,
Allin Cottrell <cottrell wfu edu> writes:
> > please note that pango_font_metrics_get_approximate_char_width()
> > returns the approximate glyph advance, not the approximate glyph
> > width. The function is probably badly named but it seems that the
> > return value is reasonable if you take this into consideration.
>
> Actually, no. It was the glyph advance that I was interested in,
> 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.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]