Re: [css-houdini-drafts] Font Enumeration API discussion (#951)

The Houdini Task Force just discussed `Local Font Enumeration`.

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Local Font Enumeration<br>
&lt;TabAtkins> github: https://github.com/w3c/css-houdini-drafts/issues/951<br>
&lt;iank_> cmp: SImilar usecases, these web applications that we'd like to enable, would like to get a list of local fonts to present users a list of local fonts which are avail.<br>
&lt;iank_> cmp: Proposing a change to the font loading specification.<br>
&lt;iank_> &lt;displays code on screen><br>
&lt;TabAtkins> Reading again thru the old thread you linked, Myles, I find the major objection is about the usefulness of exposing binary data, given the necessity of porting a font-shaping engine to JS to do anything useful with it. There's a mention at the end that wasm should make this concern much less problematic, and I think time has shown this correct. ^_^<br>
&lt;iank_> cmp: Adds a FontFace.getMetadata() function.<br>
&lt;Rossen_> q?<br>
&lt;iank_> cmp: Again this is meant to be a font-chooser UX. E.g. allowing the user to access the local fonts, then allow access to the table.<br>
&lt;iank_> cmp: Also an Intent to Implment for this API.<br>
&lt;iank_> myles_: &lt;discussion around minor code issue><br>
&lt;iank_> heycam: navigator.fonts is a separate issue?<br>
&lt;iank_> cmp: navigaor.fonts is a FontFaceSet.<br>
&lt;iank_> heycam: Same as document.fonts?<br>
&lt;iank_> TabAtkins: No different.<br>
&lt;TabAtkins> s/No /No, /<br>
&lt;iank_> myles_: Can you state the usecase for this?<br>
&lt;TabAtkins> TabAtkins: document.fonts provides sync access to all the webfonts. This needs to give async access, for filesystem-enumeration reasons.<br>
&lt;iank_> cmp: Usecase for this is a web application would like to get a list of the locally installed fonts, the web application they shows a font picker, then the web application can access this font do things with it.<br>
&lt;iank_> myles_: Most document applications want to show the exactly the some thing? So what application are you thinking of?<br>
&lt;plinss> q+<br>
&lt;iank_> cmp: A design application for example. E.g. have a locally installed font that is under a license.<br>
&lt;iank_> TabAtkins: E.g. a company have purchase a particular font.<br>
&lt;iank_> TabAtkins: And want to use this consistently.<br>
&lt;iank_> myles_: We don't consider locally installed fonts for to web content.<br>
&lt;TabAtkins> TabAtkins: Or a company that can assume all the designers have access to a particular purchased font, and are just going to use it for local collab + printing.<br>
&lt;krit> q+<br>
&lt;iank_> myles_: Therefore would be able access via this api.<br>
&lt;iank_> s/would be/wouldn't be/<br>
&lt;Rossen_> q?<br>
&lt;heycam> q+<br>
&lt;iank_> myles_: In at least one of the 3 browsers, the issue would be solve that this API is trying to solve<br>
&lt;iank_> s/would be solve/wouldn't be sovled/<br>
&lt;Rossen_> ack plinss<br>
&lt;heycam> q-<br>
&lt;iank_> plinss: Rather than an api which enumerates all the fonts, expose an API which allows the browser to select a single font?<br>
&lt;iank_> TabAtkins: If that was the proposal would that reduce your concerns?<br>
&lt;Rossen_> q?<br>
&lt;iank_> myles_: Yes, but when fingerprinters run, they could enumerate over all the fonts which would provide a lot more entropy.<br>
&lt;plinss> s/browser to select/browser to display its own font picker and the user select/<br>
&lt;iank_> iank_: But its a behind a permission prompt?<br>
&lt;pwnall> q+<br>
&lt;iank_> myles_: I don't believe there is a set of words which would indicate informed consent.<br>
&lt;Rossen_> ack krit<br>
&lt;iank_> myles_: (for the permission prompt)<br>
&lt;TabAtkins> I agree, permission prompts are valuable, but limited.<br>
&lt;iank_> krit: What about a new UI element, if the font isn't available, would you get a notification that a particular font isn't available?<br>
&lt;iank_> krit: Would there be an API where an application could ask in a particular font is installed.<br>
&lt;iank_> heycam: In the font loading spec at the moment, if you call check() with a font which isn't available (e.g. not loaded, or not in installed local fonts) then it should throw.<br>
&lt;iank_> cmp: None of  the implementations return the additional information.<br>
&lt;iank_> heycam: whether this API is a good idea is a separate question.<br>
&lt;iank_> krit: Have a document w/ text in it which used a separate font. The web application needs to identify this case.<br>
&lt;Rossen_> q?<br>
&lt;iank_> TabAtkins: On browsers which still expose a large set of local fonts via the font family. check() would still work. but on safari it wouldn't.<br>
&lt;iank_> myles_: We also know, iterating over all the fonts in a system is the wrong way to do it.<br>
&lt;Rossen_> ack pwnall<br>
&lt;iank_> pwnall: One usecase that I wanted to share, that wouldn't be solved w/ the picker in the UA. Web applications can design very complex pickers based on the usecase, e.g. the web application can filter based on what licsence types can be used (and should be available) for a particular project type.<br>
&lt;Rossen_> q?<br>
&lt;iank_> pwnall: There are usecases which are lost if the UA has to implement the picker.<br>
&lt;Rossen_> ack dbaron<br>
&lt;Zakim> dbaron, you wanted to raise one more issue about permission prompts<br>
&lt;iank_> dbaron: One other thought about permission prompt, has two purpsoes, to gain support, and to teach the user that this doesn't happen in other cases.<br>
&lt;iank_> dbaron: E.g. the location permission, this idicates to the user that the location isn't exposed by default. Teaches the user about the expectations around privacy for the user.<br>
&lt;iank_> dbaron: Asks a question to the user which doesn't usually happen.<br>
&lt;iank_> dbaron: In this case, given how fonts work today, that is quite difficult.<br>
&lt;Rossen_> q?<br>
&lt;iank_> TabAtkins: If the UA provide the font picker , then we wouldn't need that picker.<br>
&lt;iank_> TabAtkins: How would the web application know about the license type.<br>
&lt;plinss> s/that picker/that permission/<br>
&lt;iank_> pwnall: The web application would scan font tables, e.g. woff has a licensing table to provide the ability to filter.<br>
&lt;dbaron> I wonder how many seconds (or minutes) said app would take to do that scanning of font tables to populate the UI!<br>
&lt;TabAtkins> ScribeNick: TabAtkins<br>
&lt;TabAtkins> dbaron: We've def seen in browser font stack impls, especially for the "users who have lots of fonts" cases, just setting up the font infra in the browser can sometimes be a serious perf problem.<br>
&lt;TabAtkins> dbaron: So anya pp doing what you just said, scanning all the fonts, there's a good risk of that taking seconds to minutes.<br>
&lt;jsbell> q+<br>
&lt;dbaron> s/anya pp/any app/<br>
&lt;TabAtkins> cmp: Yeah, good point. We're trying to see the effect in practice as we experiment.<br>
&lt;TabAtkins> myles_: Do you know of a native app that does this kind of license filtering? I'd like to play with it.<br>
&lt;TabAtkins> pwnall: I'll follow up with you.<br>
&lt;myles_> mmaxfield@apple.com<br>
&lt;TabAtkins> astearns: There are "design applications" that will do pre-flighting of fonts used in a doc as it's doing output.<br>
&lt;TabAtkins> astearns: As you're saving something, you can ahve a step that checks for fonts and ensures they're licensed.<br>
&lt;TabAtkins> TabAtkins: That use-case would be handled by the font-face tables access of UA-picked fonts, without needing full enumeration.<br>
&lt;TabAtkins> jsbell: I use GIMP, it takes forever to load, that's what tools do.<br>
&lt;TabAtkins> jsbell: I think it's presumptuous to say that we don't think that class of applications can be used on the web.<br>
&lt;TabAtkins> cmp: Thank you for the comments! We'll follow up, please ping me with additional comments.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/951#issuecomment-533401634 using your GitHub account

Received on Friday, 20 September 2019 04:36:34 UTC