FW: Proposal: text-vertical-position property

Ben Cotterell wrote:
| When is text ever positioned relative to the vertical centre of an
| inline box?

Apparently always. In FF and Opera, a point halfway between the top of the
tallest glyph box in the font and the bottom of the deepest glyph box in the
font is vertically centered in the inline box. Justification is found in
10.8.1:

"User agents center glyphs vertically in an inline box, adding half-leading
on the top and bottom. For example, if a piece of text is '12px' high and
the 'line-height' value is '14px', 2pxs of extra space should be added: 1px
above and 1px below the letters."

Half-leading is added to (or subtracted from if line-height is less than the
height of the font) the *inline box*.

| But looking back at your original suggestion, I think I see now more
| what you mean. You want to change the reference point used for centering
| inline boxes in a line.

No. (My original proposal needs editing; I'll repost it after some work.)
What I am proposing is a means to specify a subset of a font's character
set - or an arbitrary offset from the font's baseline - to be
vertically-centered in the inline box . Though I didn't know it at the time,
I'm not alone in thinking this is a good thing. From 10.6.1:

"Note: level 3 of CSS will probably include a property to select which
measure of the font is used for the content height."

I've been referring to the inline box rather than content height, but I
believe the intent is the same.

David Perrell

Received on Sunday, 27 January 2008 04:45:21 UTC