[cairo] text measuring speed

Jon Smirl jonsmirl at gmail.com
Sat Jun 11 09:02:28 PDT 2005


On 6/11/05, John Ellson <ellson at research.att.com> wrote:
> OTOH.  It would be nice if any font-related caches populated during  the
> layout phase could be useful to cairo during rendering....   So if the 
>reason for cairo-based text-metrics is to reuse
> the caches, then that would justify it for me.

On possible reason could be subpixel positioning of the text string.
Freetype/pango should subpixel position the individual glyphs in the
string.  The bitmap from generated from freetype/pango would be RGBA.
But it isn't really RGBA it's gray scale expanded 3x horizontally.

Maybe Cairo should have an API for accepting 3x gray scale that is
masquerading as RGBA. If Cairo knows it is 3x gray then it is legal to
shift the bitmap on a subpixel basis. This would work as a general
API, the 3x gray bitmaps don't have to be text.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the cairo mailing list