[cairo] Font metrics under font transformations
Keith Packard
keithp at keithp.com
Mon Jan 10 14:30:35 PST 2005
Now that we have an answer for glyph metrics under font transformations,
I'd like to see if anyone has an idea of what the font metrics should look
like.
Font metrics include three vertical spacing values and maximum advance
values in both directions (it's not a maximum advance vector as the values
are compared separately).
Keeping our 'rotated glyphs are weird' view of the world, one simple idea
would be to just return the 'scale only' metrics, ignoring the non-scale
portion of the font matrix. This will be hard to document, and will
likely confuse anyone who does accidentally rotate a font.
An alternative would be to compute the vertical line spacing in user space
between adjacent lines; this works except for 90° rotations where it
produces an infinite result. We could return 'inf/-inf' in this case if
necessary.
The third option is to return vectors for all of these values. This will
complicated usage of these values in the 'normal' cases, but will
otherwise work just fine. Note that 'max_x_advance' and 'max_y_advance'
will *also* be vectors as they point along the font space baseline.
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050110/e6c35a2c/attachment.pgp
More information about the cairo
mailing list