[Bug 77443] Re-using rasterisations of unhinted glyphs is unsafe

Alex Jones alex at weej.com
Fri Dec 29 21:03:35 UTC 2006


Public bug reported:

Binary package hint: libgtk2.0-0

Character geometries with unhinted fonts are inherently non-integer.
When rendering a glyph, it seems a pre-rendered glyph is simply drawn
into the text layout at an integer-rounded position calculated by the
sum of the non-integer widths of previous characters in the layout. This
gives the problem which can be observed in the attached screenshot.

It seems that glyphs are unconditionally rendered with an anchoring at
(0.0, 0.0) locked to the pixel grid. I can't think of a better way to
demonstrate this other than to draw a diagram, but hopefully you
understand what I mean.

As far as I can see, there are two ways to deal with this.

The first is to consider all glyphs, hinted or otherwise, to have
integer widths. This keeps the re-usable rasterisations and relieves the
problem of inconsistent character spacing.

The second is to render glyphs on a case by case basis, with the pixel
grid of the rasterisation process offset accordingly.

I believe the second solution would give excellent quality font
rendering, but is probably harder to achieve.

Thanks

** Affects: pango (upstream)
     Importance: Unknown
         Status: Unconfirmed
** Affects: pango1.0 (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
Re-using rasterisations of unhinted glyphs is unsafe
https://launchpad.net/bugs/77443




More information about the desktop-bugs mailing list