[cairo] Text scaling and hinting
rocallahan at gmail.com
Tue May 3 23:06:24 PDT 2005
I'm currently working on having Mozilla draw text through the new Cairo font
APIs (the text in my blog screenshot was a hack based on Xft). The new Cairo
font APIs have all metrics depending on the current transformation matrix
because of hinting effects. That's fine, but we also need the ability to get
a cairo_scaled_font_t and render those exact outlines under other
One obvious use case is animated rotation/scaling of a multi-line text
object. If we allow the metrics to change during the animation, lines might
break in different places during the animation, which is probably not what
the author wants. Performance would also suffer because we'd have to run our
layout algorithm at each and every step of the animation. Alternatively, we
could just cross our fingers, hope that the metrics don't change much, and
don't rerun the layout algorithm --- but that will lead to glyphs
overlapping at the boundaries of text runs, and other ugliness.
What do you think?
["Therefore, my dear friends, as you have always obeyed–not only in my
presence, but now much more in my absence–continue to work out your
salvation with fear and trembling, for it is God who works in you to will
and to act according to his good purpose." Philippians 2:12-13.]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo