Re: small revision to CSS1
David Seibert writes:
> I am currently working on translating CSS1 to DSSSL-o, and
That's excellent! We are writing a document that describes the
mapping, intended to be published as a WD "soon". Some people may have
seen an early draft of it. (If you're interested, ask me; the draft is
still there, it's just not currently linked from anywhere.)
> have run into a problem that could be very easily fixed by
> a small change in the CSS1 specification. Translating the
> values for the attribute 'font-style' is difficult to do
> cleanly because 'small-caps' involves a transformation of
> the characters of the text, while the other values ('none',
> 'italic', and 'oblique') can be translated as a style
> description. My problem would be remedied if the value
> 'small-caps' were instead given to the attribute
Text-transform replaces characters by other characters, `rot13' is a
text-transform (it replaces `a' by `n') and so is `uppercase' (it
replaces `a' by `A'). A small-caps font just happens to have an `a'
that looks like a reduced and then stretched `A', but it is really
still the same `a' character.
In DSSSL, small-caps is supposed to be handled with a glyph
substitution table, the same one you would use to substitute a swash
letter for a normal one, or a ligature for a sequence of letters. In
fact, the italic shapes of most fonts are so different that you might
want to consider that a glyph substitution as well. But glyph
substitution is a concept that CSS1 doesn't have, and that is anyway
too technical for most people. Typographically, small-caps is just a
different font within the same font family.
Modern electronic typesetting is able to produce oblique small-caps as
well, and so we allowed that combination in the font-style
property. (We also allowed italic small-caps, although that doesn't
make as much sense, because italic and oblique are almost synonyms for
> This move makes sense in the context of CSS, as 'small-caps'
> is orthogonal to any of the other possible values of
> 'font-style' (i.e., it can be specified independently of
> those values), but not to the values of 'text-transform'
> ('none', 'lowercase', 'uppercase', and 'capitalize'). This
> quickly becomes apparent if you try to imagine producing
> 'small-caps uppercase' text. The move also makes sense
Small-caps combined with uppercase happens to leave you with the same
shapes as normal uppercase (at least in most fonts), except that they
will usually be drawn from a different font file.
Small-caps + capitalize or small-caps + lowercase make perfect
sense. In fact small-caps + capitalize is Netscape's `house style'.
> for the DSSSL-o translation of 'text-transform', as all of
> these values (except 'none', of course) obviously involves
> transformations of the text as well, making the grouping
> more natural.
Only Glyph substitutions (which use a glyph-subst-table in DSSSL), but
not character transformations (which use a char-map).
> I realize that CSS has officially become stable, but I
> doubt that this small change would represent a problem to
> anyone trying to implement it at present. It should at
> most involve moving a small amount of code between
> subroutines, as there will be no change in the behavior
> required to implement the value. As it would be
> advantageous for DSSSL and DSSSL-o translation, and would
> help keep users from specifying style prescriptions that
> are impossible to render, I suggest that this change be
> made as soon as possible.
I expect that in most implementations, the routines for font-style and
text-transform are very different. Trying to add the functionality of
small-caps to text-transform would mean that the latter routine would
suddenly have to interface to the font subsystem, where it used to be
a self-contained bit-shift function.
PS. What are your plans with the CSS1 to DSSSL-o translation, will it
be a program or just a document? And will it be available to
Bert Bos ( W 3 C ) http://www.w3.org/
firstname.lastname@example.org 2004 Rt des Lucioles / BP 93
+33 93 65 77 71 06902 Sophia Antipolis Cedex, France