Skip to content
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

Mixing patch types and GID "management" #182

Closed
skef opened this issue Jun 6, 2024 · 2 comments
Closed

Mixing patch types and GID "management" #182

skef opened this issue Jun 6, 2024 · 2 comments

Comments

@skef
Copy link
Contributor

skef commented Jun 6, 2024

At earlier points of the discussion of the new system we discussed the various issues relating to the multiple patch types and GIDs. One of these has to do with how codepoints are mapped -- whether the mapping goes through the GID or directly from codepoint to a bin or "segment". (I believe this was addressed by providing both options.)

The other issue is how GIDs are managed outside of the mapping. There are three ways of dealing with this, broadly speaking, but one probably doesn't make sense. The first is to have the dependent patches preserve GIDs. That will probably have a minimal impact on the compressed size of transmitted fonts, but will increase the uncompressed size. The second is to add a "remapping" table indicating the independent-patch-GID for the current dependent patch state. This can be as simple as an array of GIDs where the index is the dependent patch GID and the content is the independent patch GID.

Note that the second solution requires a bit more infrastructure, because not only do you need to do some client-side management when a new patch changes the mapping (to get everything in the right place), you also need to either keep the chunks around, or to stash the content of GIDs you're not using yet, so that if a new patch adds a glyph in an already downloaded independent patch you can insert it without re-downloading.

(The third option is to have different independent chunk sets for different patch levels, but that's unattractive for a variety of reasons.)

I'm not sure what decisions we came to about this stuff, maybe it was just to require that when the patch types are mixed one must preserve GIDs in the dependent patches. But either way, after a quick scan through the document (and having read the relevant sections more completely in recent weeks) I don't think we're addressing this yet.

@garretrieger
Copy link
Contributor

garretrieger commented Jun 6, 2024 via email

@garretrieger
Copy link
Contributor

Looks like we currently don't say anything really about how to mix patch types in the considerations section. So I'll add a new sub section for that and discuss this issue and the other considerations for constructing an IFT font with mixed patch types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants