-
Notifications
You must be signed in to change notification settings - Fork 44
MarkFeatureWriter does not allow multiple anchor marks on the same glyph #303
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
Comments
The change was meant to match Glyphs.app behavior. The problem with multiple mark anchors on the same glyph is that the same glyph cannot belong to multiple mark classes within the same lookup subtable, and unlike before when we were creating one mark2base lookup for each markClass (thus they were always disjoint and the problem didn’t arise), we now make a single mark2base lookup. |
About that... Null anchors are read as anchors at (0, 0) by InDesign 14.0.1 and maybe others. We didn’t have this issue with split lookups. |
I don’t think we should match Glyphs.app here, or at least one should have the option not to. |
Sounds reasonable. I won’t be able to look into it before second week of March. But I’d happily review PR |
@schriftgestalt: How does Glyphs handle this case? |
I don’t think Glyphs can handle multiple _mark anchors. Just to be sure, I can’t find the test font in the linked repo? |
There is both UFO sources and generated OTFs in the repo. |
Together with the last version of fontmake that can work with it. googlefonts/ufo2ft#303
Copied from ufo2ft commit 3fe4446ec60231baf5bc5f9992bf99feb0be2f92, as later ones are broken: googlefonts/ufo2ft#303 This allows us to use the latest fontmake again.
Copied from ufo2ft commit 3fe4446ec60231baf5bc5f9992bf99feb0be2f92, as later ones are broken: googlefonts/ufo2ft#303 This allows us to use the latest fontmake again.
I have a patch locally that uses |
@anthrotype What’s the status of your patch? We can work on it if you share the branch? |
@moyogo sorry I can't seem to find it any more... Do you want to take this up? |
I believe this is a regression, since my font used to build fine with fontmake 1.4.0 (not sure what version of ufo2ft this used).
If a glyph has more than one mark anchor, e.g.
_mark1
and_mark2
only one of them will end up in the generated mark classes. This is caused by the code in: https://github.com/googlei18n/ufo2ft/blob/39ab30c54ab71b24d96bb68e0965c41937d39b35/Lib/ufo2ft/featureWriters/markFeatureWriter.py#L361-L364I don’t know what the rationale for this, but it is a severe limitation and breaks my fonts. OpenType allows any number of mark anchors on a glyphs and ufo2ft should allow this.
For testing, try building Reem Kufi with latest fontmake and ufo2ft, the string لأ should render like the first image below, but it now renders like the second:

The text was updated successfully, but these errors were encountered: