Re: Rounding problem in pango
- From: Behdad Esfahbod <behdad cs toronto edu>
- To: Chia-I Wu <b90201047 ntu edu tw>
- Cc: gtk-i18n-list gnome org
- Subject: Re: Rounding problem in pango
- Date: Fri, 20 Jan 2006 07:40:05 -0500 (EST)
On Wed, 18 Jan 2006, Chia-I Wu wrote:
> Hi,
>
> The next release of freetype will not round the font metrics.
> (http://lists.gnu.org/archive/html/freetype-devel/2005-12/msg00027.html)
>
> As a result, the extents of layout will usually non-integral. This can cause
> some problems. For example, consider a layout with a single line which has
> ascent and descent 14.4 and 0 logically, 11 and 0 actually.
>
> When a GtkLabel is created with such a layout, it will have height round(14.4)
> and the layout will be paint at (0, 0). Then if the glyphs are bitmaps, pango
> draws them with the baseline at round(14.4) and the top 1 pixel is clipped
> out. I think outline glyphs also suffer from this, perhaps milder.
>
> In this image, comparision of GtkLabel rendering with freetype 2.1.10 (right)
> and cvs (left) is shown:
>
> http://www.olv.idv.tw/~olvaffe/tmp/freetype2/pango.rounding.png
Nice writup, can you cook a patch please?!
--behdad
http://behdad.org/
"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]