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

[GDEF] >64k expansion #36

Closed
behdad opened this issue Sep 19, 2021 · 5 comments
Closed

[GDEF] >64k expansion #36

behdad opened this issue Sep 19, 2021 · 5 comments
Labels
Implemented Implemented in HarfBuzz or doesn't need to Layout >64k expansion
Projects

Comments

@behdad
Copy link
Member

behdad commented Sep 19, 2021

Of the GDEF fields:

That is to say, there is no pressing work to be done here. Definitely nothing for first milestone.

The biggest pressure here is the 16bit offsets; the combined size of the various structures make it hard to fit them all within those offsets.

Fortunately, MarkAttachmentClass's use can be reduced by the compiler in favor of MarkGlyphSets. And MarkGlyphSets and ItemVariationStore already use 32bit offsets, so they can escape far away enough. LigatureCaretList uses one layer of offset16's. So as long as GlyphClassDef for the whole font can be built in about just under 64k, the table is buildable. That probably will become the most pressing point on how to order the glyph-order. But, again, workable for even a whole-unicode font.

As such, no work to be done here for now. Yay!

@behdad behdad changed the title [GDEF] >64k expansion [GDEF] >64k expansion WIP XXX Sep 19, 2021
@behdad behdad added this to the BE 2.0 ~= OT 2.0 milestone Sep 19, 2021
@behdad behdad added the Layout label Sep 19, 2021
@behdad behdad closed this as completed Sep 19, 2021
@behdad behdad changed the title [GDEF] >64k expansion WIP XXX [GDEF] >64k expansion Sep 19, 2021
@behdad
Copy link
Member Author

behdad commented Sep 19, 2021

Humm. Leaving open without first milestone to eventually address the limits.

@behdad behdad reopened this Sep 19, 2021
@behdad behdad modified the milestones: BE 2.0 ~= OT 2.0, BE 3.0 Sep 19, 2021
@behdad
Copy link
Member Author

behdad commented Sep 19, 2021

Fortunately, MarkAttachmentClass's use can be reduced by the compiler in favor of MarkGlyphSets.

This is not entirely true, because MarkGlyphSets, just encoding the offset32's, takes considerable space. However, MarkGlyphSets is versioned. So we can add a Extension / trampoline version... Or... I'll just modify the Glyph Filtering proposal #25 to remove reliance on MarkGlyphSets for generalized glyph filtering and add a new GlyphSets entry that is referenced using an offset32. Then we can gradually move towards using glyph-filtering to reduce pressure on mark-filtering data structures.

@behdad behdad added this to To do in BE 2.0 spec Sep 22, 2021
@behdad
Copy link
Member Author

behdad commented Jul 10, 2022

Eventually we should add a version 2.0 table with Offset24's, like GSUB/GPOS: #58

But this is not pressing.

@behdad
Copy link
Member Author

behdad commented Jul 12, 2022

struct GDEFVersion2 {
  Version version; // 0x00020000
  Offset24To<ClassDef> glyphClassDef;
  Offset24To<AttachList> attachList;
  Offset24To<LigCaretList> ligCaretList;
  Offset24To<ClassDef> markAttachClassDef;
  Offset24To<MarkGlyphSets> markGlyphSets;
  Offset32To<ItemVariationStore> varStore;
};

Note that the varStore offset is 32bit, for compatibility with 0x00010003 version.

behdad added a commit to fonttools/fonttools that referenced this issue Jul 19, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 19, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 19, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 19, 2022
@behdad behdad added the Implemented Implemented in HarfBuzz or doesn't need to label Jul 19, 2022
@behdad
Copy link
Member Author

behdad commented Mar 6, 2023

Speced: https://github.com/harfbuzz/boring-expansion-spec/blob/main/beyond-64k.md
Implemented in HarfBuzz.

@behdad behdad closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Implemented Implemented in HarfBuzz or doesn't need to Layout >64k expansion
Projects
No open projects
Development

No branches or pull requests

1 participant