text and compositing

Keith Packard keithp at keithp.com
Sat Apr 24 06:35:03 EST 2004


Around 13 o'clock on Apr 23, Jon Smirl wrote:

> xserver implemented on top of OpenGL doesn't have the identity transform
> requirement.

I don't follow this; the idea is to have an identity transformation between
the X protocol and some place where pixels are stored so that the X
protocol semantics are honored.  Any non-identitiy transform would have to
be applied in a texturing operation that was not visible to the X 
application.

> Does the Cairo architecture for text allow text generation for a
> transformed destination buffer?

Yes, cairo has no precise pixelization specification, so we should feel
free to ammend the backend to apply a transformation to the input of the
font rasterization algorithm.  Note that I've never seen a font system
capable of dealing with non-affine transforms, so the actual results may
still not be ideal in all cases.

> Does freetype support a 3D projection martix or is it contrained to 2D? 

We can extract vector data from FreeType and transform it ourselves, but
the rasterizer within FreeType (and in fact the Type1 and TrueType hinting
specifications) deal solely with affine transformations.

> The font caching system will need to track the transformation matrix too.
> Although non-distorted transformed glyphs could be reused at different scaling
> factors (points).

Any transformation will distort the glyphs when hinting is applied.  The
existing FreeType rasterization cache does handle the affine transformation
case correctly, but again, we'll have to do projective transformations
ourselves.

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://freedesktop.org/pipermail/xserver/attachments/20040423/75ccb720/attachment-0001.pgp


More information about the xserver mailing list