[cairo] Font interface problem

Carl Worth cworth at east.isi.edu
Mon Apr 5 07:07:27 PDT 2004


On Apr 5, Banlu Kemiyatorn wrote:
 > I don't know if I like glyph_t to have both x,y in it. In openstep framework
 > we use an array of glyphs that only contain the index value. It's the typesetters
 > that will find the positions of the glyphs so I really wonder if letting users
 > to fill the glyphs' positions by themselves is actually the right design. (Using this
 > internally is understandable but I think making x,y in glyph_t visible is confusing)

It's not so much that we expect "users" to fill in the glyph positions
themselves.

What's going on here is that we recognized that various platforms have
different "native" font systems which must be used for user-visible
consistency. However, it would not be feasible to abstract these font
systems within cairo. So, instead, cairo just exposes the native font
system. (Currently, freetype is the only such system exposed by cairo,
but I would expect others to appear if cairo matures on non-Linux
platforms.)

So, the x,y stuff in the glyph allows code above cairo to call into
freetype and pass values into cairo. If you don't expect your "users"
to call into freetype, then this functionality can be abstracted in a
layer above cairo.

-Carl





More information about the cairo mailing list