W3C home > Mailing lists > Public > www-style@w3.org > March 2010

Re: [css3-fonts] Please add font-variant-caps: all-small-caps and all-petite-caps

From: John Daggett <jdaggett@mozilla.com>
Date: Mon, 1 Mar 2010 00:54:57 -0800 (PST)
To: "Adam Twardoch (List)" <list.adam@twardoch.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, www-style <www-style@w3.org>
Message-ID: <917931919.12774.1267433697805.JavaMail.root@cm-mail03.mozilla.org>
> fantasai wrote:
>> Wouldn't
>>   text-transform: lower-case;
>>   font-variant: small-caps
>> or
>>   text-transform: lower-case;
>>   font-variant: petite-caps
>> work?
> 
> It would have a different effect. First, uppercase Unicode characters
> would be transformed to lowercase Unicode characters, and then the
> OpenType "smcp" feature would be applied to lowercase font glyphs.
> This is not always equal to the effect of applying the OpenType "c2sc"
> feature to uppercase font glyphs.

I didn't include these for exactly the reason fantasai points out.  But
it sounds like you're saying that not supporting this prevents the use
of contextual information needed for optimal layout by an OpenType
rendering engine.

> For example, the small-cap variants of certain uppercase Greek letters
> may be different than the small-cap variants of their lowercase
> counterparts.

Hmm, this is interesting, could you describe why this would be the case?
It seems counter-intuitive to concept of small-caps.

> The transformation would also not work for certain
> Unicode characters that do not have a lowercase variant (e.g. U+1E9E:
> ẞ). 

What would a font show for this character with 'c2sc' applied?  The small-caps
version of 'ss'?

> Finally, some fonts include additional transformations in the
> "c2sc" OpenType feature, for example for punctuation characters. For
> instance, if the text is set in all small caps, the font could also
> substitute parantheses or brackets by smaller variants -- but the
> normally-sized brackets or parantheses would be used if small caps are
> only applied to lowercase letters.

Why is this something that can only be done when 'smcp' is enabled?  Is
this just because one can't assume that there are no uppercase forms
(e.g. '(Apple)')?

One option would be to simply define the combination of
'font-variant-caps: small-caps' with 'text-transform: lowercase' to mean
(1) apply 'c2sc' if available, otherwise (2) lowercase the text and
apply 'smcp' or (3) lowercase and use resized uppercase glyphs if
neither feature is available.  Definitely harder to implement however.

Because of the way small-caps is defined in CSS 2.1, where resized
uppercase glyphs are used to simulate small caps, we would probably need
to define 'all-small-caps' with similar behavior.  But I'd prefer not to
extend that behavior to petite caps, even though that will cause
confusion for some authors.

John Daggett
Received on Monday, 1 March 2010 08:55:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT