Re: [w3ctag/design-reviews] Font Table Access API (#400)

> For example, "in incognito mode, don't expose the fonts" or something similar is what we would generally expect.

Thanks - I'll add something. In practice, it might be more subtle than that. Browsers allow file upload in incognito, and exposure of specific fonts seems comparable.

> It seems you added a choose method, but the mechanism is still of the format "give me all the fonts" and allow user to choose which fonts to expose. What we asked for was - "let the user choose a font and then you get back a font". 

Correct, and understood. We consider it critical to support use cases where multiple fonts - including potentially all local fonts - are provided to the site in one user interaction. We tried to craft an API shape that would allow browsers to support this use case, or alternately (perhaps in more privacy-focused modes, or just different UAs) limit the number of fonts exposed, perhaps to just a single font.

> Another concern we have is the exposing the `blob` function and access to the font raw data. You stated that users of the API will want to provide data to libraries that expect all the fonts. That is the justification for the `blob` approach. Can you provide examples of such libraries you're talking about? 

To clarify: libraries expect the full data for a given font, rather than a subset of tables. An library example is the pairing of HarfBuzz and FreeType, used by many native and (more recently) web applications to implement custom text stacks. These take as input full OpenType font files, and do the table parsing themselves. We did early experiments with APIs that produced only some of the font tables, and to interoperate with existing libraries required glue code that recomposed a full container file from the parts. 

> Our assumption was that the goal of such API is to replace those libraries.

The goal of the API is to provide the data so that it can be _consumed_ by those libraries. 


-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/400#issuecomment-1185826791
You are receiving this because you are subscribed to this thread.

Message ID: <w3ctag/design-reviews/issues/400/1185826791@github.com>

Received on Friday, 15 July 2022 19:06:02 UTC