A partial archive of discourse.wicg.io as of Saturday February 24, 2024.

Unicode Fallback Content

stuartpb
2015-08-13

Essentially, it would be nice if browsers could display content with extended characters using the browser’s glyph support, only having to fall back to an image (or even just something as simple as :)) only if the UA lacks support for any of the referenced glyphs. This is a feature devs have required in the past, and it’s something there’s no real solution for.

Maybe there’s a solution somewhere in MathML?

MT
2015-08-13

Indeed, ever extending Unicode causes some issues with using characters defined in a newer Unicode standard in older implementations (and/or with older fonts) that don’t support such newer characters.

It would be nice to have a standard way(s) to detect both support for specific characters by an implementation and availability of such characters in a specific font.

stuartpb
2015-08-13

While this is true, I’m more interested here, for this thread, in a declarative solution that page authors could use to implement this simply and without dependencies. (Of course, it’s important that any such mechanism should be accompanied by the appropriate imperative APIs to mirror its behavior in other contexts, but that’s not reason to abandon an HTML solution.

tabatkins
2015-08-13

Isn’t this just a matter of fonts? If one font doesn’t have a given glyph, you can specify a fallback font to look into.

stuartpb
2015-08-13

Yes, but not all fallback content is glyphs, particularly in the emoji space where there’s no way (that I know of) to specify a full-color glyph. (Granted, most sites that I’ve seen handling emoji look to override the UA’s emoji collection, but it’s not inconceivable that a site could wish to mirror it, akin to the font-family: system, -apple-system, sans-serif idea Apple is proposing right now).

Also, it’s not just glyphs - it’s also complex ligatures and writing rules, where if the UA doesn’t support any part of it it’s best to just fall back to displaying an image for the entire span.