[cairo] Font metrics under font transformations
Keith Packard
keithp at keithp.com
Tue Jan 11 09:26:28 PST 2005
Around 18 o'clock on Jan 11, Maarten Breddels wrote:
> yup, I vote for vectors solution too, just makes life easier i guess.
I guess I have two questions:
1) Where do we expect to use transformed fonts, and how do
applications want to set text with transformed fonts?
I see two 'legitimate' cases here --
a) Artificial oblique -- shearing text along the X axis. In this
case, the Y values don't change at all, so there's no actual
problem
b) Inverting the coordinate space. Right now, cairo uses the upper
left corner as 0,0. I imagine applications like PostScript or PDF
viewers might want a lower-left origin, in which case they must
flip both the graphics coordinate system and the font coordinate
system. Do we want to report negative line spacing in this case?
PostScript does not; to move down the page, you subtract the
font height.
Other transformations should be considered 'fringe' cases for which "some"
answer should probably be given, although a strong argument for returning
an error when asked for font metrics can be made.
2) How should an application set text in neat rows when presented
with line spacing which includes an X component?
For this, I have no good answer -- as we do currently present glyph advance
values as vectors, it seems logical to do the same with line advances, but
the inverted coordinate space case makes this less compelling.
-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/20050111/a659abac/attachment.pgp
More information about the cairo
mailing list