[cairo] text measuring speed
keithp at keithp.com
Mon Jun 13 08:58:47 PDT 2005
On Mon, 2005-06-13 at 11:03 -0400, Jon Smirl wrote:
> Isn't the concept behind the freetype autohinter to try and keep
> important parts of the glyph from disappearing, like the opening in
> the middle of an 'o'?
No, hinting is entirely related to adjusting glyph outlines to improve
legibility at small pixel sizes, often by adjusting horizontal and
vertical strokes to align with pixel boundaries, and to reshape other
strokes so that they have proportional widths (something the autohinter
doesn't do well at this point). All of these computations are actually
independent of the rasterization process, they just need an abstract
pixel grid within which to operate.
When rasterizing without anti-aliasing, FreeType performs 'dropout'
controls where it ensures that strokes don't disappear at small sizes,
but I don't know of anything which attempts to preserve counters.
> This is a much bigger problem. Can you fix this without changing the
> current Cairo API?
Abstractly, it is independent of the cairo API, but computationally it
is probably visibily more expensive.
We've avoided a projective transformation in the cairo API on purpose as
it is strictly a 2D drawing API. There is currently a hidden
transformation in the X backend which performs a simple translation so
that toolkits can share a single window for multiple widgets, so there
is precedent here to add a projective transformation as part of a
backend which isn't visible through the normal cairo interface.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050613/e157ec70/attachment.pgp
More information about the cairo