After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 327852 - rounding problem due to freetype not rounding metrics anymore
rounding problem due to freetype not rounding metrics anymore
Status: RESOLVED NOTABUG
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-01-20 12:42 UTC by Behdad Esfahbod
Modified: 2006-02-26 21:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Behdad Esfahbod 2006-01-20 12:42:11 UTC
Date: Wed, 18 Jan 2006 01:23:58 -0500
From: Chia-I Wu <b90201047@ntu.edu.tw>
To: gtk-i18n-list@gnome.org
Subject: Rounding problem in pango

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, 15 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

--
Regards,
olv
Comment 1 Behdad Esfahbod 2006-02-13 23:12:54 UTC
The URL doesn't work, but I've observed this with FreeType HEAD.
Comment 2 Behdad Esfahbod 2006-02-25 12:57:00 UTC
Seems like this can use a fix in Cairo:

  https://bugs.freedesktop.org/show_bug.cgi?id=5862

and Xft already does this.  Remains FT2 backend, which probably is not worth a change at this point...  Closing for now, until we get a report about FT2.
Comment 3 Behdad Esfahbod 2006-02-26 21:39:55 UTC
David Turner reverted that change btw...