-
Notifications
You must be signed in to change notification settings - Fork 43
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
filters: sort glyphs by decreasing component depth to avoid order-dependent issues #625
Conversation
Ugh.. looks like the PropagateAnchorsFilter also have some order-dependent problems. the propagateAnchors_test.py expect "amacron" to be in the https://github.com/googlefonts/ufo2ft/runs/7007492994?check_suite_focus=true#step:5:138 |
it turns out it's the reporting of modified glyphs that is wrong in the PropagateAnchorsFilters, not the actual effect. Basically 'amacron' glyph is used as component from 'amacrondieresis' and as such it is modified as well (even when only the latter is included and not the former!), however if 'amacrondieresis' gets filtered before 'amacron' (like after this patch which sorts deeper composites first), only the 'amacrondieresis' is reported to be modified by the filter, the 'amacron' is skipped because already processed and modified as part of the 'amacrondieresis' propagation... |
_propagate_glyph_anchors modifies not only the current composite glyph but all the nested composite glyphs used in between, however it was only reporting to be modifying the root glyph
…e as processing parts
3fcba73
to
44e5046
Compare
The test that was failing on main branch #626 now passes here, so I think I'm happy with this. I also added tests to confirm that nothing changed in propagateAnchors_test.py (besides the hidden bug that not all the "modified" glyphs were actually reported as such, but that's minor). |
Fixes #621