-
Notifications
You must be signed in to change notification settings - Fork 448
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] FeatureVariations subsetting is wrong #1881
Comments
I'll try submitting a minimal fix and a simple pruning but won't be able to contribute tests. I hope there are tests for those code path already. |
thanks Behdad, i'll fix up the tests as needed |
To test this dropping-from-end-of-array of FeatureVariationRecords with no substitutions, we need create a VF where FeatureTableSubstitutions contain more than one SubstitutionRecords referencing different FeatureIndex; then we'd drop one feature while keeping another and assert that the thus emptied FeatureVariationRecords at the end of the FeatureVariations are dropped, and that empty records that precede non-empty ones are kept. |
…ationRecords Added a TODO for the partial dropping of FeatureVariationRecords #1881 (comment)
@behdad when the subsetter has dropped all the existing FeatureVariationRecords, should it not also remove the emptied FeatureVariations table and downgrade the GSUB/GPOS table version to 0x00010000 (inside |
Yes. I thought that's implemented. |
Right. You will hit same situ in partial instancing as well. I don't know how to share such pruning code.... |
if you mean this: fonttools/Lib/fontTools/subset/__init__.py Lines 1637 to 1639 in 9279f93
then nobody seems to be setting table.FeatureVariations = None when FeatureVariationRecords list is empty |
Right... That's normally done when |
I didn't quite get what you meant here. |
I mean, I assume you implemented FeatureVariations updating in your partial-instancer code. That code can also do some pruning and possibly removing FeatureVariations if empty. |
ah yes, we do remove FeatureVariations when left empty in the instancer. |
…ationRecords Added a TODO for the partial dropping of FeatureVariationRecords fonttools#1881 (comment)
Fixed in #1903 |
Humm. Not sure. |
Was fixed in cab7d13 |
originally reported by @behdad at harfbuzz/harfbuzz#2334 (comment)
The text was updated successfully, but these errors were encountered: