Font-size [and font-size-adjust] (was RE: Units, font sizing, and zoom suggestion for CSS 3)

Font-size (and font-size-adjust)
================================

 (In summary: forget font-size-adjust; add a "mode" argument
 to font-size [like Ian Hickson suggested, since font-ex-size
 would not work]. Let that "mode" default to 'line-height'.)


First, let’s forget about font-size-adjust.  Its intended functionality
is much better realised by the suggestion below.  It could be left as
a no-op, or just left out of CSS 3 completely.  (So one does not
need to work out how the below proposal "interacts" with font-size-adjust.
It simply doesn't if font-size-adjust is left as a deprecated no-op.)

As Ian Hickson suggested, add a “mode” parameter to “font-size”.  E.g.:

 font-size 1cm  -- sets the Åp-height (swashes not counted) to 1 cm.
 font-size line-height 1cm  -- sets the Åp-height (swashes not
counted)
  to 1 cm. This sets the *nominal* line-height of the glyphs,
  as opposed to the baseline separation, which is set by
  the 'line-height' property. Choose another name if you like.
 font-size 1.5line  -- sets the Åp-height (swashes not counted) to
1.5
  times of the inherited computed size.
 font-size line 1.5line  -- sets the Åp-height (swashes not counted)
to
  1.5 times of the inherited computed size.
 font-size cap-height 1cm -- sets the cap height (swashes not
counted;
  or ideographic height) to 1 cm.
 font-size cap-height 1.5cap -- sets the cap height (or ideographic
  height) to 1.5 times what it was.
 font-size ex-height 1cm -- sets the x-height to 1 cm.
 font-size ex-height 1.5ex -- sets the x-height to 1.5 times what it
was.


The only scripts that appear difficult with this approach is Arabic and
Mongolian.  But these scripts are often mixed with the Latin script,
so I guess there is some kind or reasonable, and 'traditional', size
relationship for these scripts too, relative to Latin script glyphs.

font-size cap-height is useful for all caps headlines, and for text which
are mainly ideographic.

font-size ex-height is useful for texts which mix capital and small letters,
with small letters dominating.

Note that the default "mode" is "line-heigth".  Thus there will be few
surprices
for the current uses of "line-height", though it will be a bit more
consistent.

Note that since, according to this suggestion, font-size should take a
'mode' parameter, the current "definition" of "em" becomes moot.  See
my parallel message on "What's an em".

Units:
 ex -- the x-height
 cap -- the H-height; a.k.a. cap-height
 line -- the Åp-height; a.k.a. Ép-height

line-height:
 line-height 2cm -- sets the line height to 2 cm
 line-height 1line -- sets the line height to the current Åp-height
 line-height 1.2cap -- sets the line height to 1.2 times the current
  H-height (cap height)
 line-height 1.5line -- sets the line height to 1.5 times the current
  Åp-height


I don't see why the descender to ascender height (maybe to be the
Opentype ""em"") would be very useful for a CSS file author.  Åp (line)
height, cap height, ex height, and em width I do see as useful.

  Kind regards
  (still trying to get this "spec.d/done right")
  /kent k

Received on Monday, 31 January 2000 12:22:13 UTC