Re: [css3-fonts] font selection for Unicode Variation Selector

Koji Ishii wrote:

> When source text contains Unicode Variation Selector[1][2][3],
> how does that affect font choice for the code point?
> 
> Here's an example. With the following style:
>   font-family: A B;
> and let's say both fonts contains the glyph for U+8FBA, but
> only font B contains VS1 of U+8FBA.
> 
> For the source text of U+8FBA VS1, should font A be used to
> render it, or B?
> 
> I assume font B, as font A does not contain the glyph the
> author specified and ignores VS1, but I'd appreciate
> clarification since Variation Selector can behave differently
> from the regular code point for font fallback.

As John Hudson has described, I think the answer here is A, in
other words the user agent does not search through the font list
until it has found a font which supports a given variation
selector, it always chooses the first font that contains a glyph
for the underlying character.  This is the way it's implemented
in Firefox 4, which has UVS support on all platforms.  Here's an
example reftest:

  http://people.mozilla.org/~jdaggett/font-face/ivs-1.html
  http://people.mozilla.org/~jdaggett/font-face/ivs-1-ref.html

There's a certain amount of overlap here between UVS and various
font-variant values (e.g. jis78, character-variant).  Those work
the same way, if a font contains a glyph for the underlying
character but doesn't support a variant, the default glyph is
used rather than falling back.

But I agree UVS handling should be explicitly detailed in the
spec.

Regards,

John Daggett

Received on Monday, 21 February 2011 06:38:32 UTC