[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] sub pixel positioning when Auto hinter and cache are used
From: |
Werner LEMBERG |
Subject: |
Re: [ft] sub pixel positioning when Auto hinter and cache are used |
Date: |
Wed, 03 Jun 2009 09:06:45 +0200 (CEST) |
> I have a question on whether it is possible to perform sub pixel
> positioning when my system is using Auto Hinting and FreeType's
> cache subsystem. If yes, I would be really keen to know how. I
> need to perform text rendering that is fast (thus it requires cache
> to be activated), support sub pixel positioning and all glyphs are
> hinted.
You can cache glyph outlines using FTC_ImageCache.
> There is one problem with this which I know not yet how to solve,
> which is that FTC_SBit only return the metric values in pixels
> instead of in 1/64th points.
[In the following, I use `pixmap' for anti-aliased renderings of a
glyph.]
Exactly. It is not possible to cache pixmaps with non-integer
positions. You would have to store 64 pixmaps for a single glyph
otherwise!
> In addition to that, when we perform Auto hinting, we can't get the
> lsb_delta and rsb_delta of a glyph when FTC_SBitCache_Lookup() is
> used.
Well, since the sbit cache don't allow subpixel positioning, lsb_delta
and rsb_delta are always zero, so there's no need to cache them.
Werner