WICG / local-font-access

Web API for enumerating fonts on the local system
https://wicg.github.io/local-font-access
Apache License 2.0
75 stars 16 forks source link

Why does this API elide tables/subtables not supported by the UA? #37

Closed jfkthame closed 3 years ago

jfkthame commented 3 years ago

The draft says:

Table types within the original font file that are not supported by the user agent should be elided from the font representation's table list as defined by this specification. Tables with subtables not supported by the user agent should be transcoded to elide those subtables.

This seems odd to me. Surely one reasonable use case for an API like this would be to allow a page or webapp to implement things that the user agent does not natively support. For example, if the font contains bitmap glyphs (or perhaps embedded SVG glyphs) in a format that the UA doesn't support, the app might wish to parse those tables itself to extract and render the glyph images itself. Or if the UA doesn't support a particular shaping technology (e.g. SIL Graphite), the app might want to embed its own WASM-compiled engine, but to do this it will need access to the Graphite tables in the font, which this proposal says would be elided as "unsupported".

So I think this aspect should be reconsidered.

oyiptong commented 3 years ago

We did reconsider this statement. In fact, we're reconsidering getTable() in favor of blob(), which will return font data, even if not supported by the UA.