-
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
markFeatureWriter mark class grouping is problematic #762
Comments
From what I remember, the point of grouping was to have fewer lookups because each lookup = one more loop over the input string to apply the lookup, if I understand correctly (so it was more a performance consideration than file size). That being said, I don't know how much the performance penalty would be, and whether some people would be ready to trade it for smaller file size, especially if the gains are not negligible. I remember from discussing this issue some time ago that you used to use "ambiguous" anchor attachments, as per your comment here: #416 (comment) ; could this be such a case? Do you get the info message about ambiguous stuff? |
Yes, I get messages about ambiguous anchors, but I get that with pretty much all of my fonts that I build with fontmake. |
I’m using ufo2ft directly here, though, and I have some hacky code to force a particular lookup order. This probably gets broken when some anchors are merged together in the same lookup (This font has a long history, and for most of its life it was developed using FontForge where I had complete control on how the lookups are built and ordered, which I switched to UFO/ufo2ft I had to hack my way to get a matching output). |
Maybe you could use your own copy of the mark feature writer in which you disable grouping? |
maybe grouping should be smarter and avoid grouping ambiguous attachements |
I’m essentially using my own mark feature writer, it is just this is second time I get issues with this grouping logic (the other one was in a certain secret project, and I ended up forking the mark feature writer there as well, but I don’t remember the exact details of the issue). I’m also not sure the number of lookups can be that a performance issue, it is not like you are going to end up with thousands of them. This font has too many anchor classes than most typical projects, and I got only 8 more lookups (that is out of 62 GPOS lookups). |
I was debugging a rather odd InDesign bug, where all my mark positioning gets lost, and I tracked it down to:
ufo2ft/Lib/ufo2ft/featureWriters/markFeatureWriter.py
Lines 456 to 501 in 7807ef5
Usually I’d brush this as an InDesign bug and move on, but I noticed something with HarfBuzz. Try with this version of the font with mark class grouping:
and now with this version without grouping:
The later output is the correct/expected one.
The file without grouping is smaller as well despite having more number of lookups (I noticed this with other fonts too), so I’m not sure what is the benefit of this mark class grouping over doing the simple thing?
The text was updated successfully, but these errors were encountered: