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 transformation matrices.<br>
<br>
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.<br>
<br>
What do you think?<br>
<br>
Rob<br>-- <br>["Therefore, my dear friends, as you have always obeyed–not only in my<br>presence, but now much more in my absence–continue to work out your<br>salvation with fear and trembling, for it is God who works in you to will
<br>and to act according to his good purpose." Philippians 2:12-13.]