W3C home > Mailing lists > Public > www-style@w3.org > July 1997

Re: Confused with length units em,en, & ex in Margin

From: Todd Fahrner <fahrner@pobox.com>
Date: Tue, 22 Jul 1997 16:32:25 -0700
Message-Id: <v03102804affaea61750d@[206.245.203.103]>
To: neil@bigpic.com, Hakon Lie <howcome@w3.org>
Cc: www-style@w3.org
At 4:39 PM -0600 7/22/97, Neil St.Laurent wrote:

>We're implementing a visual editor for CSS.

Hooray! A noble, difficult task, to be sure.

>In languages without 'N' and 'M' and 'X' is the value for the
>measurements en,em, and ex supposed to be mapped to something
>appropriate?  Are there any guidelines that you know of?

"Em" has a historical connection to the letter M, but as others have
pointed out, in modern practice em is simply the measure of the font; i.e.,
in a 10-pt font, 1 em is 10 points. Period.

Similarly, En may initially have had a connection to the actual letter, but
as a unit it is 0.5em. In a 16-pt font, 1en = 8pt.

Ex is different, in that it really is specific to the design of a font, not
just its nominal size. In roman fonts, the ex-height is shorthand for the
height of all lower-case letters without ascenders, dots, or other extra
verticality, and often adjusted optically for the overshoot of serif cusps,
the apogees of arcs, etc. All of these letters, typically, are 1ex tall:
acegmnopqrsuvwxyz .

The ratio of ex to em will vary widely, predominantly with the
art-historical influences of the font's design: more modern faces tend to
have taller relative ex heights. Scripts and old-style faces have smaller
x-heights. Sans-serif faces tend to have taller ones (cf. Verdana and
Centaur). There are tons of exceptions, so take this with plenty of salt.

In Hermann Zapf's Optima typeface, the ratio of ex-height to ex+ ascender
or descender is in the golden section, i.e., 1:1.618 .

I don't know whether ex-height has any very meaningful analog in a given
non-roman typeface.

________________________________________
Todd Fahrner
mailto:fahrner@pobox.com
http://www.verso.com/

The printed page transcends space and time. The printed page, the
infinitude of books, must be transcended. THE ELECTRO-LIBRARY.

--El Lissitzky, 1923
Received on Tuesday, 22 July 1997 19:21:52 GMT

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