8000 atttempt to fix offset overflows in MarkBasePos subtables by anthrotype · Pull Request #1297 · fonttools/fonttools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atttempt to fix offset overflows in MarkBasePos subtables #1297

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

Merged
merged 3 commits into from
Jul 23, 2018

Conversation

anthrotype
Copy link
Member

if an offset overflows within a MarkBasePos (GPOS lookup type 4), we attempt to split it by moving half of the mark classes to the new subtable.

Fixes googlefonts/fontmake#450

@anthrotype anthrotype requested a review from behdad July 19, 2018 17:02
@anthrotype
Copy link
Member Author

this should also fix the first of the two errors reported by @miguelsousa in #1296 (comment)

@miguelsousa
Copy link
Collaborator

@anthrotype this patch does NOT fix the Source Serif overflow error reported in #1296.
These are the messages before the traceback happens:

...
INFO:fontTools.varLib:Merging TT hinting
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 8, 'SubTableIndex:', None, 'ItemName:', None, 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'BaseArray.BaseAnchor.YDeviceTable', 'ItemIndex:', None)
INFO:fontTools.ttLib.tables.otBase:Attempting to fix OTLOffsetOverflowError ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'BaseArray.BaseAnchor.YDeviceTable', 'ItemIndex:', None)
...
fontTools.ttLib.tables.otBase.OTLOffsetOverflowError: ('GPOS', 'LookupIndex:', 0, 'SubTableIndex:', 0, 'ItemName:', 'BaseArray.BaseAnchor.YDeviceTable', 'ItemIndex:', None)

@anthrotype
Copy link
Member Author

@miguelsousa thanks for checking, I'll have a look next week

@anthrotype
Copy link
Member Author
anthrotype commented Jul 23, 2018

Yeah, I checked and indeed, this PR doesn't fix that Source Serif Pro build issue.
In that font, the MarkToBase subtable whose offsets are overflowing already only contains ClassCount of 1 so there is nothing else to split according to the method implemented here (which only splits the mark classes and respective records between the two new split subtables). When there is only one mark class defined like in this case, it just bails out.

I'm going to merge this PR, as it fixes some other Noto build failures. We'll try to fix #1296 in a different patch.

@anthrotype anthrotype merged commit 5a1ccf1 into fonttools:master Jul 23, 2018
@anthrotype anthrotype deleted the fix-mark-base-overflow branch July 23, 2018 11:58
@behdad
Copy link
Member
behdad commented Jul 23, 2018

Yeah, I checked and indeed, this PR doesn't fix that Source Serif Pro build issue.
In that font, the MarkToBase subtable whose offsets are overflowing already only contains ClassCount of 1

Can you check how many marks and how many bases in there?

@anthrotype
Copy link
Member Author

not many: 28 marks and 71 bases

@behdad
Copy link
Member
behdad commented Jul 23, 2018

not many: 28 marks and 71 bases

That's unusual. How can I test this easily?

@behdad
Copy link
Member
behdad commented Jul 23, 2018

Ok I follow up on the other issue.

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

Successfully merging this pull request may close these issues.

3 participants
0