Units, font sizing, and zoom suggestion for CSS 3

Hi!

The following is a suggestion for CSS 3.

------------------------------------------------------------------------


Absolute length units (the parenthesised ones may be ignored):

	µm - micrometer (spelling: use either U+03BC (preferred) or
		U+00B5 as the first letter; the spelling with U+339B
		should be deprecated, if at all allowed).

	mm - millimeter (preferred unit for absolute font sizing; the
		spelling with U+339C should be deprecated, if at all
allowed).

	cm - centimeter (the spelling with U+339D should be deprecated,
		if at all allowed).

	dm - decimeter.

	pt - pica point, about 0.3515 mm (i.e. 351.5 µm); should be
		deprecated.

	(bpt - big pica point, about 0.3528 mm (i.e. 352.8 µm), 0.4 %
		bigger than pt; should be deprecated, if at all allowed.)

	dd - Didôt point, 0.376 mm (i.e. 376 µm), 7.0 % bigger than
		pt, 6.6 % bigger than bpt; commonly used in traditional
		European (non-British) typography; new to CSS but should
		be deprecated.

	pc - pica, about 4.2175 mm (i.e. 4 217. 5 µm); should be deprecated.

	(bpc - big pica, 12 pt, about 4.233 mm (i.e. 4 233 µm);
		should be deprecated, if at all allowed.)

	cc - cicero, 12 dd, 4.512 mm (i.e. 4 512 µm); commonly used in
		traditional European (non-British) typography; new to CSS
		but should be deprecated.

	in - inch, 2.54 cm (i.e. 25 400 µm; exactly); should be deprecated.


Relative length units (the parenthesised one may be ignored):

	Åp - height between the top of a (non-swash) capital Å and
		bottom of a non-swash, and not small caps, small p
		in the current font and size; this should be the
		minimum recommended baseline spacing for this font
		and size; the top of a capital Å is (or should be,
		if the typeface is properly designed) the same as
		the top of a capital É (ÅÉ); if there is no Å (or É)
		or p in the font, a suitable approximation is calculated.
		This unit should not be confused with the em!

	ex - height of a small x in the current font and size;
		if there is no x in the font, a suitable approximation
		is calculated.

	em - width(!) of a capital M in the current font and size;
		this is the historically correct definition of em,
		and the definition of em used by TeX; if there is no
		M in the font, a suitable approximation is calculated.

	(en - half an em. (Not necessarily the width of an N.))

	tmu - 1/18 em, TeX 'math unit' (not so wisely called 'mu'
		there).

	px - (see the description in the CSS 2 specification and
		the note about zoom below; in the unusual (nowadays)
		event that the screen has very low resolution, 1 px
		may be significantly smaller than one pixel).


Underline and overline:

	underlining should be done at the first accent level below the
		baseline, and should "pause" for accents below, descenders,
		and subscripts; superscripts should be underlined at the
		first accent level below the unsubscripted baseline.

	overlining should be done at the first accent level above of capital
		letters, and should "pause" for accents above, high(!)
		ascenders, and superscripts; subscripts should be overlined
		at the first accent level above unsubscripted capitals.


Font size setting (font-ex-size is a suggested new attribute):

	font-size - sets (or changes) the Åp height, which is
		maintained through typeface changes; the ex, em, (en),
		and tmu may vary depending on typeface.

	font-ex-size - sets (or changes) the ex height, which is
		maintained through typeface changes; the Åp, em, (en),
		and tmu may vary depending on typeface; even though
		the Åp height may change through typeface changes,
		the baseline separation does not change with it.

	font-size-adjust is kept for backwards compatibility, but
		font-ex-size should be preferred (and appears to be
		more robust, since it does not only apply to
		replacement fonts).

	baseline position (used for Latin/Greek/Cyrillic/Arabic/Hebrew):
	when the line height is larger than the Åp height, then
	more of the extra space is above the topline (about 2/3 of
	it) than below the baseline (about 1/3 of it).

	centreline position (used for horizontal CJK and 2d math
	expressions): baseline position + half ex height.

	topline position (used for Devanagari, etc.): baseline
	position + height of unaccented capital letters


Global zoom:

	Print media intended to be read at handheld distance should
	have a default global zoom of 100 %.  The UA may allow this
	zoom to be changed.

	Desktop/laptop displays (screens) should have a default
	global zoom of 130 % (in each dimension), for reading comfort.
	At the default zoom, the size of 1 px should coincide with
	the physical size of one pixel for most modern desktop/laptop
	displays.  However, at, e.g., a (total, see below) zoom of
	65 %, a vertical line 1 px wide, will actually be about half
	a pixel wide and needs to be antialiased. Note that to get
	the sizes correct on the desktop/laptop screens, the system
	needs to know the physical size of pixels (which may vary
	depending on the screen settings).  The UA should allow this
	zoom to be changed, and may allow storing an individually
	preferred default global zoom.  Note that for desktop/laptop
	displays, a (total) zoom of 100% implies that a specified
	absolute length, should actually be that length on the screen
	surface.

	Of course there is no default zoom for public address print
	media (banners, posters, ...), or for public address displays.
	For these cases, especially for public address displays, a
	nominal global zoom value is used, since the actual zoom
	might not be known.


Local zoom (suggested new attribute):

	zoom - changes the local zoom.  The parameter is either a
		percentage value or a dimensionless value. The local
		zoom is multiplied with the inherited zoom to get the
		total zoom for that part. The total zoom is inherited.
		The initial value is the (nominal) global UI zoom.

	The total zoom applies to all actual lengths, including the
	size of images, but does not apply to computed lengths.
	I.e., the computed lengths are unaffected by the zoom, but
	computed lengths are transformed to actual lengths by
	multiplying the computed length with the total zoom value,
	and possibly further adjusted.

	Note that this is a zoom for fonts, rather than a font size
	change, since a font size change may imply a glyph design
	change, which a zoom should not imply. 


------------------------------------------------------------------------

		Kind regards
		/kent karlsson

Received on Monday, 17 January 2000 09:08:20 UTC