[cairo] text measuring speed

Jon Smirl jonsmirl at gmail.com
Sun Jun 12 20:27:32 PDT 2005


Here's my third reply, maybe I'm thinking about the problem backwards.

The general scenario is taking a normal rectangular window buffer with
beautiful hinted, subpixel optimized text and then having the composer
transform this buffer. The problem is that after transform the text
isn't optimal anymore.

The backwards part of the thinking is that I'm trying to fix the
problem after everything is already drawn. Instead the app should just
ask the composer what the window transform is before drawing and set
it into Cario as a global transform. Now everything will get generated
with the correct hinting/subpixel positioning. If the composer changes
the transform it just asks the app to redraw. It the composer's
responsibility to make sure that the window buffer is always large
enough to hold the image being generated with the transform applied.

Legacy apps won't know what is going on because they won't ask the
composer for the transform.

This scheme would let the composer chose when to ask for a transformed
window image. For a fast animation it would just do normal hardware
transforms on whatever the last window image it had. For a static
image it would trigger a repaint and ask for optimal generation.

-- 
Jon Smirl
jonsmirl at gmail.com



More information about the cairo mailing list