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

instantiator: when applying DS rules, must also swap anchors #632

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

anthrotype
Copy link
Member

Glyph.clear() destroys all anchors (and pen protocol does not 'draw' them).
fontmake.instantiator needs to also swap the glyph anchors when applying the DesignSpace conditional substitution rules, just like it does for the contours and components.
Otherwise, the swapped glyphs will lose all their anchors and get no mark/mkmk features...

NOTE: If you used fontmake to generate fonts that contain "bracket" glyphs or a DesignSpace document with rvrn-style conditional substitution rules, and these glyphs contain any anchors which were supposed to be used to generate mark or mkmk feature, I strongly recommend that you re-generate your fonts using the new fontmake and glyphsLib (which we are going to release shortly after this is merged).

Apologies, we should have caught this earlier.
Many thanks @chrissimpkins and @danielgrumer for reporting this bug (and this one too googlefonts/glyphsLib#578).

Glyph.clear() destroys all anchors (and pen protocol does not 'draw' them).
We need to also swap the glyph anchors when applying the DesignSpace conditional substitution rules,
just like we do for contours and components.
Otherwise, swapped glyphs lose all their anchors and get no mark/mkmk features...
Yes, this was bad. We should have caught this earlier.
@anthrotype anthrotype requested a review from madig January 29, 2020 17:18
@anthrotype anthrotype merged commit 6b2b699 into googlefonts:master Jan 29, 2020
@anthrotype anthrotype deleted the instantiator-swap-anchors branch January 29, 2020 17:26
@marekjez86
Copy link
Contributor

thanks @anthrotype @madig

@danielgrumer
Copy link

Thanks guys! 👏👏

@chrissimpkins
Copy link
Member

Thanks @anthrotype & @madig!!

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.

5 participants