Rounding problem in pango
- From: Chia-I Wu <b90201047 ntu edu tw>
- To: gtk-i18n-list gnome org
- Subject: Rounding problem in pango
- Date: Wed, 18 Jan 2006 14:23:58 +0800
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
--
Regards,
olv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]