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

[GSUB/GPOS] Main struct >64k expansion #58

Closed
behdad opened this issue Jul 4, 2022 · 1 comment
Closed

[GSUB/GPOS] Main struct >64k expansion #58

behdad opened this issue Jul 4, 2022 · 1 comment
Labels
Implemented Implemented in HarfBuzz or doesn't need to Layout >64k expansion

Comments

@behdad
Copy link
Member

behdad commented Jul 4, 2022

Currently the tables cannot support more than ~3k lookups before the LookupList offsets themselves overflow. I hit this limit when trying to merge all 180 Noto Sans fonts. To address this, the main GSUB/GPOS structs need to be bumped to version 0x00020000.

struct GSUBGPOSVersion2 {
  Version version; // 0x00020000
  Offset24To<ScriptList> scripts;
  Offset24To<FeatureList> features;
  Offset24To<LookupList24> lookups;
  Offset32To<FeatureVariations> featureVars;
};

Note that the last item is a 32bit offset, for compatibility with version 0x00010001 tables.

were LookupList24 is a list16 of offset24 to Lookup structures:

using LookupList24 = List16OfOffsetTo<Lookup, uint24>;
behdad added a commit to fonttools/fonttools that referenced this issue Jul 4, 2022
To fix offset overflows of LookupList itself.

Implements harfbuzz/boring-expansion-spec#58
behdad added a commit to fonttools/fonttools that referenced this issue Jul 4, 2022
To fix offset overflows of LookupList itself.

Implements harfbuzz/boring-expansion-spec#58
behdad added a commit to fonttools/fonttools that referenced this issue Jul 8, 2022
To fix offset overflows of LookupList itself.

Implements harfbuzz/boring-expansion-spec#58
behdad added a commit to fonttools/fonttools that referenced this issue Jul 9, 2022
@behdad behdad removed the WIP label Jul 10, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 11, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 11, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 11, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 11, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 12, 2022
@behdad behdad added the Implemented Implemented in HarfBuzz or doesn't need to label Jul 12, 2022
behdad added a commit to harfbuzz/harfbuzz that referenced this issue Jul 12, 2022
behdad added a commit to fonttools/fonttools that referenced this issue Jul 12, 2022
To fix offset overflows of LookupList itself.

Implements harfbuzz/boring-expansion-spec#58
behdad added a commit to fonttools/fonttools that referenced this issue Jul 12, 2022
This was referenced Jul 26, 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
None yet
Development

No branches or pull requests

1 participant