-
Notifications
You must be signed in to change notification settings - Fork 635
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
[subset] MATH: don't serialize coverage table when iterator is empty #3319
Conversation
when iterator is empty, just set coverage offset to 0. serialize() in coverage will at lease write out a 16-bit format header.
Well, then find a software engineer to do the thinking for you to see if we can change fonttools as well to remove that header. Then come back. |
The real reason probably has to do with this: |
Can you point to examples? I have a hard time imagining that. |
Here's an example: In output GDEF table, there're non-zero coverage offsets for empty coverage tables in MarkGlyphSetsDef I found some comments in harfbuzz code explaining this: |
Okay, thanks. Next time please include all your findings such that the reviewer can make an informed decision. FontTools is not impeccable, so "to match fonttools" is not enough reason to write code in HarfBuzz. Thanks. |
sure! |
FWIW, both Chrome and Firefox release builds don't pass the three G* layout tables to OTS, so you might want to ignore it's illuminations regarding these tables. |
Yeah I was thinking it might be time we should relax that limitation in fonttools subsetter as well, as I think OTS was fixed a while back. Khaled, do you remember? |
I think we fixed some of these null offsets long ago, it is worth retesting if OTS still rejects them |
Yeah that's also my recollection. |
@qxliu76 Is that something you can look into? |
|
when iterator is empty, just set coverage offset to 0.
serialize() in coverage will at least write out a 16-bit format header.
I didn't change serialize() method to return early, since I noticed sometimes fonttools keeps this header for other tables.
This minor cosmetic change mainly aims to match fonttools's result for MATH table, so that we have less diff noise during ttx comparison.