Re: [csswg-drafts] [css-fonts] Propose adding lang as a font-face descriptor

> Due to Han unification, rendering a character completely correctly requires both the codepoint and the lang

Han unification is a clear use case for language-specific font rendering, but not the only one. In Cyrillic, for example, there are differences between Russian, Serbian and Bulgarian rendering of the same Unicode code point. ([A good explanation](https://www.fontsmith.com/blog/2016/10/12/cyrillic-script-variations-and-the-importance-of-localisation)).

As to whether we need a new descriptor though, things are less clear. OpenType already has a language feature, and Fonts 3 [Language-specific display](https://drafts.csswg.org/css-fonts-3/#language-specific-support) already states:

> If the content language of the element is known according to the rules of the document language, user agents are required to infer the OpenType language system from the content language and use that when selecting and positioning glyphs using an OpenType font. 

If that is not enough, there is also the [`font-language-overide`](https://drafts.csswg.org/css-fonts-3/#propdef-font-language-override) property.

I see the motivation for the proposed descriptor, but also see it re-inventing the OpenType language system with a combination of a new descriptor and a link to a (subsetted, single-language) font.

This seems at odds with the direction the font industry seems to be headed, with multi-language fonts which can have quite careful and nuanced typography for different languages, depending of course on the effort and interest of the font designer.

The matching scheme mentioned by @faceless2 looks the same as [BCP 47 language tagging](https://tools.ietf.org/html/bcp47). On the other hand, OpenType language tagging uses a [single level of 4-byte codes](https://www.microsoft.com/typography/otspec/languagetags.htm). So for example Traditional Chinese is `ZHT  `.

-- 
GitHub Notification of comment by svgeesus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1744#issuecomment-362692326 using your GitHub account

Received on Friday, 2 February 2018 20:06:10 UTC