W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2017

Re: [csswg-drafts] [css-fonts] Consider specifying UA should not perform system fallback for Unicode PUA

From: Dominik Röttsches via GitHub <sysbot+gh@w3.org>
Date: Tue, 19 Dec 2017 09:31:16 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-352688149-1513675875-sysbot+gh@w3.org>
> How does the browser know which font is the one which contains the PUA characters? For example, someone’s font family list may first contain a Chinese font and then an English font, with the English font containing the PUA character (and the Chinese font containing no PUA characters at all). This is a situation where Web content currently relies on font fallback for PUA characters. (Also the Apple logo, as I mentioned above.)

As explained in the initial issue description, I am only suggesting to standardize this for **system font fallback**, not for the fallback through the font-family list. I agree resolving PUA usage requires traversing through the family names specified in the font-family list.

But what happens after that: After the font-family list is exhausted, system font fallback occurs, in which usually the engine asks the OS APIs to return a font for a character which it otherwise does not have a glyph for.

The point here is that asking the OS API to return something for PUA characters does not have a well defined behavior.

Example: A web icon font uses its own arbitrary assignment of icon codepoints in PUA to certain icon semantic, but the system fallback codepoint search returns a Devanagari font which for some reason makes use of PUA since that happens to be the only font with PUA coverage on the system. Displaying a Devanagari glyph while the web icon font loads does not make any sense.

> If your text engine is finding a broken font, shouldn’t your fix the text engine rather than introduce a new standard?

I am arguing that no engine can reliably find system fallback fonts for PUA codepoints, as the semantics of codepoints in PUA are intentionally undefined. The benefit in standardizing not to do system fallback for PUA would be that we avoid each engine using whatever random semantically unsuitable font for PUA that it finds on the system. I think the best rendering for not found PUA glyphs would be to display HEX codes using a LastResort blocky rendering, like FF does. 

GitHub Notification of comment by drott
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2110#issuecomment-352688149 using your GitHub account
Received on Tuesday, 19 December 2017 09:31:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:21 UTC