W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2016

[csswg-drafts] [css2][css-inline] Definition of line-height calculations contradicts itself

From: fantasai via GitHub <sysbot+gh@w3.org>
Date: Mon, 08 Aug 2016 21:36:03 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-170031486-1470692161-sysbot+gh@w3.org>
fantasai has just created a new issue for 
https://github.com/w3c/csswg-drafts:

== [css2][css-inline] Definition of line-height calculations 
contradicts itself ==
I'm having a little trouble with the CSS2.1 spec.
  https://drafts.csswg.org/css2/visudet.html#line-height

# for each glyph, determine the A and D. Note that glyphs
# in a single element may come from different fonts and
# thus need not all have the same A and D. [...]
#
# Still for each glyph, determine the leading L to add,
# where L = 'line-height' - AD. Half the leading is added
# above A and the other half below D, giving the glyph
# and its leading a total height above the baseline of
# A' = A + L/2 and a total depth of D' = D + L/2.

So, let's suppose the line-height is 1. The leading is
zero, right? So we end up with some glyphs with ascenders
A1, A2, etc. and descenders D1, D2, etc. The As are not
all identical. Neither are the Ds. When we align them all
along the baseline, we get a set of boxes that are 1em
tall, but are slightly shifted up and down.

# The height of the inline box encloses all glyphs and
# their half-leading on each side and is thus exactly
# 'line-height'.

If we draw the bounding box of the boxes described above,
the height of that bounding box is more than 1em, right?

Please view or discuss this issue at 
https://github.com/w3c/csswg-drafts/issues/391 using your GitHub 
account
Received on Monday, 8 August 2016 21:36:09 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 19 October 2021 01:30:22 UTC