[cairo] Vertical metrics

Owen Taylor otaylor at redhat.com
Mon Aug 22 05:37:17 PDT 2005

On Sun, 2005-08-21 at 22:31 -0700, Keith Packard wrote:
> TrueType fonts can supply two sets of glyph metrics, one for horizontal
> layout and one for vertical. Presently, cairo offers only the horizontal
> metrics. Fontconfig and Xft provide a way to ask for the other metrics.
> Should we add this to the cairo_font_options_t?

I don't see this as appropriate in font_options_t, which to me, is 
options that control rendering style, like hinting and antialising.
The typical place font options come are from a surface.

Vertical metrics, on the other hand, are much more closely tied
to the font and to what the application is doing with the font.

I think you'd want to do it one of two ways:
 - Make it part of the font face (very easy for the fontconfig
   backend. I haven't looked how vertical metrics work in windows)
 - Have an alternate API for getting vertical metrics.

It's actually a bit like what we discussed on IRC about getting the
unhinted advances for a hinted font ... it's easy to do by creating
a second font, but that's a bit inefficient, since you don't want 
to recompute the glyph "ink" bounding boxes, and you don't want to
rasterize the glyphs separately.

It's also a bit like the other aspect of that IRC conversation - 
I think trying to write API for allowing East-Asian vertical text
without actually implementing East-Asian vertical text could be
a mistake.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050822/5483cb4a/attachment-0001.pgp

More information about the cairo mailing list