-
Notifications
You must be signed in to change notification settings - Fork 15
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
No GPOS for Oswald #308
Comments
that's because there are no handwritten GPOS features in Oswald, only auto-generated ones (kern from higher level kerning dictionaries, possibly also mark + mkmk from glyph anchors), the stuff that ufo2ft featureWriters take care of. |
@simoncozens notes https://github.com/simoncozens/ds2varlayout is likely sufficient for Oswald, though not for the entire GF collection. |
@anthrotype notes that the autogenerated parts of fea generation are to be found in ufo2ft.featureCompiler, which runs a series of so-called featureWriters (defined in ufo2ft.featureWriters) on each master font; these generate FEA for kern (kernFeatureWriter), mark, mkmk (markFeatureWriter), which gets appended or inserted in the hand-written FEA and then sent off for compilation to feaLib |
See also googlefonts/ufo2ft#635 which gives a small example of variable kerning and some potentially informative related python to handle it. |
As @simoncozens and @madig noted in googlefonts/ufo2ft#635, in order to make sure the variable-first kernFeatureWriter produces the same result (when compiled to GPOS) as the multiple-masters-then-varlib-merged one, the kerning dictionaries for each masters need to be "unioned" or "aligned" to properly take care of differing kerning "exceptions" in the various masters. In other words, kerns missing from some masters need to be "backfilled", not just with zeros but using the more "general" value available for the given glyph pair in each master (falling back to zeros if none), see: googlefonts/ufo2ft#635 (comment) Nikolaus has written a script to do that on a designspace+UFOs, see https://gist.github.com/madig/76567a9650de639bbff51ce010783790 We should incorporate this logic in when we convert kerning data from glyphs/UFO => IR. We cannot leave unspecified those missing kerning pairs, because our variable-first IR model for kerning (map of |
I think I'm going to merge #334 and do this in it's own PR. |
Borrowing from a comment @anthrotype made so I don't forget: The UFO spec for kerning.plist explains this, see the paragraph about "Exceptions". |
Reminder to self: we still need to port https://github.com/googlefonts/ufo2ft/blob/main/Lib/ufo2ft/featureWriters/markFeatureWriter.py |
Closing this, we are at least producing a vaguely reasonable GPOS table, and can move on to finer-grained issues. |
As noted on #306, we aren't producing a GPOS for Oswald at all.
The text was updated successfully, but these errors were encountered: