New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local Font Access API #401
Comments
I have a couple of design concerns, but overall it seems like this is something that can be made to work. I filed them at https://github.com/WICG/local-font-access/issues which also lists other valuable input. |
We'd appreciate another look, if @annevk or anyone has cycles. The proposal has changed a bunch since 2020, including simplifying to eliminate assumptions about the structure of font data. |
Thanks for letting us know about the update! Some thoughts:
Hope that helps. |
Quick responses, in bullet order:
@slightlyoff followed up with:
... and I have a PR to add a non-normative note to help clarify. Again, UAs should be permitted to do normalization, but I don't expect most would.
|
Why should they be permitted to do so? How do you avoid a race-to-the-bottom? For font parsers, if browsers exposed their font parser somehow, couldn't As for font fields, leaning even more into the abstraction might be okay yeah. E.g., making the OpenType thing an example if that is something that is expected to be provided by the OS (a browser that is also the OS might still have to implement it I suppose, but that seems reasonably out-of-scope). |
* Per suggestion in mozilla/standards-positions#401 make the OpenType definitions of font representation properties non-normative. * Add acknowledgements Co-authored-by: Jeffrey Yasskin <jyasskin@gmail.com>
Re: Normalization - I guess I'm just thinking of specs differently - providing room for UAs to innovate if needed. But it also makes sense to have the spec as strict as possible, and the spec can be revisited. Anyway, non-normative text was added to clarify that UAs are not expected to normalize. If you think that should be stronger, e.g. a normative statement that UAs must not normalize, please let me know. Help is welcome! Re: Parsers - this is where we started our exploration. In Chrome's normal text stack implementation, we treat fonts as untrusted data (e.g. web fonts), decompose fonts into tables and perform validation before feeding them into OS APIs or browser-bundled libraries, and thought about exposing these tables via the API. As noted above, though, existing libraries want to consume whole font files. There's been some exploration of exposing text shaping primitives - e.g. could the HarfBuzz/FreeType APIs just be exposed to the web? (Our experience with WebSQL tells us this would be a bad idea.) Exploration here eventually converged with the Canvas Formatted Text proposal as a higher-level API that solves needs for some web apps that would still rely on browser-based shaping. But this is not sufficient for all design tools. Re: Font Fields - I took your advice and made the OpenType mapping a non-normative example. Thanks! |
Yeah, lack of normalization makes sense. I don't necessarily object to normalization, but if it's going to be done it has to be specified and implemented across implementations as otherwise developers will run into subtle issues. I suspect this will still benefit from review by font experts, such as @jfkthame. |
Hi @annevk , any updates / status on this request? |
Request for Mozilla Position on an Emerging Web Specification
Other information
Adobe is interested in using local font access in web-based authoring workflows.
The text was updated successfully, but these errors were encountered: