-
Notifications
You must be signed in to change notification settings - Fork 11
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
Considerations for "desiccated" initial font files #201
Comments
Format 1 patch maps have a dependency on cmap and maxp. Format 2 patch maps do not require any other tables. As you stated glyph keyed patches will additionally depend on a loca + glyf/CFF/CFF2 table being present. I don't believe head or post would be needed so long as the IFT processing happens before the client attempts to use the font in anyway.
So I think you could set up a very minimal initial font which utilizes glyph keyed patches like this:
A client processing the file would be required to apply the IFTX bootstrapping patch first since partially invalidating patches have priority over non-invalidating, but since it's partially invalidating an optimized client could download the required glyph keyed patches in parallel. I'd like to test this out and see if it works in practice. Assuming this all works I think it could be good to talk about how to do this in the encoder guidance.
Yes I think something like this could be good, but it would need a bit more details. There will be cases where an initial font is valid to be used and contains some initial data which can be used immediately while waiting for the first patch to arrive. So we probably want to phrase it around something like if the initial font is missing required tables (eg. cmap) it shouldn't be used until patches are applied, but if those tables are present it's OK to use before the first patches arrive. Actually, maybe it might be worth adding a flag bit into the patch map that indicates if the initial font is usable or not? |
Ah, right,
That does seem likely. I was wondering about I can imagine non-web contexts in which you might have a set of initial fonts in some directory and might want to know something about them that can't be gleaned from the filename. But in that case you're probably not trying to absolutely minimize the initial size, and anyway an encoder can include whatever tables it wants to for an unusual use case. |
I wrote up some thoughts on how to detect codepoint readiness in a separate issue since this that is a more general problem that also comes up outside of the initial font load: #223 |
Apologies if this is handled somewhere in the spec. I don't remember it being discussed explicitly but maybe it's all implicit.
I know we've discussed the possibility of effectively removing a round-trip by loading the initial font file in CSS, so that it functions analogously to the unicode mapping for unicode-range. I believe this could be done with a Base64-encoded data URL, and maybe it could be done in other ways.
Suppose (because you're paying a penalty for the Base64) you want to minimize the size of the initial file, downloading most of the "universal" data via an initial patch. So let's assume we're doing some combination of per-table patches and glyph-keyed patches (one or the other or both).
The text was updated successfully, but these errors were encountered: