W3C home > Mailing lists > Public > www-style@w3.org > August 2013

Re: [css3-fonts] properties that affect digit glyph selection

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 07 Aug 2013 00:07:11 -0700
Message-ID: <5201F21F.60502@inkedblade.net>
To: www-style@w3.org
On 08/05/2013 12:55 AM, John Daggett wrote:
> As previously noted [1], the Writing Modes spec includes statements
> about the functionality of 'font-variant' when
> 'text-combine-horizontal' is used:
>    http://dev.w3.org/csswg/css-writing-modes/#text-combine-horizontal
>    # Also, a ‘font-variant’ value of ‘full-width’ must be ignored
>    # in such cases: whether applied via ‘@font-face’ descriptor or
>    # property declaration, within the combined text this value
>    # does not not cause the UA to enable that font feature.
> As currently specified in the CSS3 Fonts spec, 'font-variant' property
> values translate to enabling/disabling specific OpenType features.
> These features typically affect the glyph selected for a given
> character. Enabling a given feature won't necessarily affect glyph
> selection for all characters. Many features only affect the glyph
> selection for a small number of characters and which characters are
> affected will vary across fonts.
> What "must be ignored" means isn't clear, but I'm assuming this
> translates to "disable the full-width variant feature (fwid)".


> However, this ignores all the possible features that might affect
> glyph selection for digits:
>   [...]
> Any one of these might influence glyph selection for digits in
> tatechuyoko runs:

I think this is totally fine.

> As defined by the OpenType spec, features are evaluated in the order
> in which they are defined in the font (*).  So if the old-style number
> feature ('onum') is defined before the half-width variant feature
> ('hwid'), the glyph selection might look like this:
>              cmap                onum                  hwid
>    character ====> default glyph ====> old-style glyph ====> half-width old-style glyph
> There probably aren't many fonts that support this specific
> combination but the space of possible combinations is quite large.
> If the goal is to leave the selection of width variants unaffected by
> other font-variant features that might adversely affect the selection
> of width variants, then layout should simply run with default features
> plus width variants.
> But I actually don't think it's important to have user agents try and
> mitigate all possible combinations that adversely affect glyph
> selection.

I agree with this statement.

> Like other odd combinations of CSS properties, unless
> there's a common "bad usage" pattern CSS should shy away from
> unnecessary edge case handling like this.  I would instead opt to
> simply remove the "must be ignored" sentence and not attempt to do
> this sort of feature mitigation.

I think using 'font-variant: full-width' in a vertical text run isn't
a "bad usage" pattern but rather a "good usage" pattern; and from your
previous threads I think the severe badness of using full-width glyphs
in a TCY composition is well-established. In fact, I can't think of
any reason why a well-meaning typographer would ever want full-width
glyphs in a TCY run of more than one character, whereas I can see that
they might want old-style numerals or something like that.

So given that there's zero use case for full-width glyphs in TCY,
and reasonable use cases for wanting full-width glyphs in vertical
text, I think it makes perfect sense to take the extra step, as we
are doing with full-width (codepoint) transformations requested via
'text-transform', of disabling full-width (glyph) transformations
requested via 'font-variant'.

Received on Wednesday, 7 August 2013 07:07:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:32 UTC