W3C home > Mailing lists > Public > www-style@w3.org > January 2008

RE: Proposal: text-vertical-position property

From: David Perrell <davidp@hpaa.com>
Date: Thu, 24 Jan 2008 12:01:19 -0800
To: <www-style@w3.org>
Message-ID: <HIEDLECHAFDEPLGKECDDKEKIAAAB.davidp@hpaa.com>

Ben Cotterell wrote:
| I think this is really what vertical-align is already for.  More values
| for vertical-align (various flavours of "middle"), in conjunction with a
| tighter definition of how inline box heights are calculated, might be a
| way to achieve this.

My perception is that vertical-align aligns an inline box within the
parent's line box; much different than aligning text within the inline box.
If you move an inline box up relative to the parent then you increase the
height of the line box. Rather than move the text upward within the inline
box, this has the effect of increasing the depth of the line box.

| But the biggest practical problem is going to be getting the information
| out of the font. Fonts just don't tell you things like the heights of
| capital as opposed to lowercase letters.

Font metrics for scalable fonts include the information needed.

In Windows, the font metrics structure provides height (ascent + descent),
ascent, descent, internal leading (a misleading name, as it actually refers
to the area between the top of the font's bounding box and the top of the
tallest ascender, i.e. the area where the uppercase diacritics reside.)
Glyph metric structures provide cap height and x-height. I don't see how any
GUI can support accurate display rendering without this info.

David Perrell
Received on Thursday, 24 January 2008 20:01:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:00 GMT