[cairo] Font metrics under font transformations

Bill Spitzak spitzak at d2.com
Thu Jan 13 13:33:25 PST 2005



Keith Packard wrote:

> 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?

Use the d (lower-right corner) of the font matrix.




More information about the cairo mailing list