[Cairo] Re: [xsvg] cairo_text_extents ?

Carl Worth cworth at east.isi.edu
Fri Dec 5 06:53:00 PST 2003

On Dec 4, Bill Spitzak wrote:
 > Even though I really like this new method of selecting a vertical font, the 
 > old mechanism should remain, in that we should have an interface to set 
 > arbitrary named flags and "knobs" on the font which can alter them in ways we 
 > have not thought of yet, but are similar to my horizontal/vertical switch. 
 > Even for western fonts I can imagine having things like weight, pen angle, 
 > etc, sort of like Metafont. These can all be encoded as "name=value" text in 
 > the font name, and maybe an interface to set them dynamically.

Complex font selection is an interesting problem, but it's outside of
the scope of cairo. Instead cairo will depend on an external
"platform-specific" font system for things like that.

If the platform-specific nature bothers you, then you can work on
advocating standardization of font systems for each platform you care
about. But that's another problem outside the scope of cairo.

 > Unknown, but I believe this has already been addressed, as I was under the 
 > impression that under the current design all fonts can be set to
 > vertical.

Cairo itself doesn't know anything about "vertical" fonts.

The cairo text support is really quite simple. It has two parts:

Font Selection:
"Toy"		Select a font by family, slant, and weight.
"Real"		Select a font in a platform-specific way.

Text drawing/placement:
cairo_show_text		Font metrics control relative glyph placement.
cairo_show_glyphs	User specified absolute placement for each glyph.

That's really all there is to it, and the hope is that this should be
sufficient for all purposes.

For example, for vertical text, one can either select a "vertical"
font using the platform-specific API then call cairo_show_text, or
else position each glyph manually using cairo_show_glyphs.


More information about the cairo mailing list