[cairo] Font metrics under font transformations

Keith Packard keithp at keithp.com
Tue Jan 11 12:39:55 PST 2005


Around 21 o'clock on Jan 11, Maarten Breddels wrote:

> No matter how weird the transformation is, the 'add advance vector' and 
> 'substract height vector' should always work, i think.

I've just thought of an obvious reason we can't just run the height 
through the font transformation and get a vector result.  Artificial 
obliquing uses a shear transformation:

	font space		user space
	[x,y]		-> 	[x + y * shear_factor, y]

Now run our simple [0,height] vector through this transformation to 
compute the 'line spacing vector':

	[0,height]	->	[height * shear_factor, height]

I submit that the line spacing should remain constant under a shear 
transformation.

Yuck. Suggestions anyone?

-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/5eb250ae/attachment.pgp


More information about the cairo mailing list