Add CSS unicode-range #102
Description
http://dev.w3.org/csswg/css-fonts/#unicode-range-desc
"This descriptor defines the set of Unicode codepoints that may be supported by the font face for which it is declared. The descriptor value is a comma-delimited list of Unicode range () values. The union of these ranges defines the set of codepoints that serves as a hint for user agents when deciding whether or not to download a font resource for a given text run."
This is important for performance reasons. With unicode range, you can break a large font into smaller sets which cover specific "alphabets" (e.g. latin, cyrillic, vietnamese, chinese) or specific characters (e.g. mathematical symbols, icons in the Private Use Areas).
A compliant user agent would download the strict minimum for a given document.
With the test cases shared below, Internet Explorer 11 downloads all the fonts defined for a given font-family: all the unicode ranges as well as the fallback font (much larger binary size due to the sheer number of supported glyphs).
Test cases:
- : download nothing http://jsbin.com/jocodedi/1/quiet PASS
- "Text “Hello”: download latin"
http://jsbin.com/cibalono/1/quiet
FAIL: latin, cyrillic, vietnamese, fallback fonts are downloaded. - Euro sign: download fallback
http://jsbin.com/xadaluwo/1/quiet
FAIL: latin, cyrillic, vietnamese, fallback fonts are downloaded. - Text “лич”: download cyrillic
http://jsbin.com/muwufeve/1/quiet
FAIL: latin, cyrillic fonts are downloaded. (fallback not defined) - Euro sign, no fallback font: download nothing
http://jsbin.com/dopacilo/1/quiet
FAIL: latin, cyrillic, vietnamese fonts are downloaded.(fallback not defined)