I was investigating an issue compiling from a GlyphsApp source to UFO with fontmake and found that although I had anchors set in some glyphs, they would not generate the correct mark attachments down the line. To my surprise, the categories/subcategories set in GlyphsApp for some unencoded custom glyphs take precedence over what anchors are actually found in the glyph design.
e.g.:
- a
foo_bar glyph was automatically categorized as "Letter"/"Combining" and would not receive mark attachment for top anchors; only when explicitly setting it to "Letter"/"Letter" would the attachment work
- a
foobar.calt mark glyph was automatically categorized as "Mark"/"Spacing" and would not be included in markClass definitions despite having _top anchors; only when setting as "Mark"/"Non-spacing" would the attachment work
This was evident from the generated UFO lib.plist <key>public.openTypeCategories</key> as well as keys in the glif files.
Would it not make sense to at least warn, or even overwrite, those categories written to the UFO, if they are contradicting with the anchors found in those glyphs?
Where is the exact code for how categories/subcategories get sorted into base/mark openTypeCategories and is a straight mapping the best metric here, seeing as GlyphsApp "guesses" wrong or uses categories that contradict the anchors?
I'm thinking, simply:
- the presence of a underscored anchor should warn/fix if a glyph is not in the mark category
- the presence of an anchor should warn/fix if the glyph is not in the base category
I was investigating an issue compiling from a GlyphsApp source to UFO with fontmake and found that although I had anchors set in some glyphs, they would not generate the correct mark attachments down the line. To my surprise, the categories/subcategories set in GlyphsApp for some unencoded custom glyphs take precedence over what anchors are actually found in the glyph design.
e.g.:
foo_barglyph was automatically categorized as "Letter"/"Combining" and would not receive mark attachment fortopanchors; only when explicitly setting it to "Letter"/"Letter" would the attachment workfoobar.caltmark glyph was automatically categorized as "Mark"/"Spacing" and would not be included in markClass definitions despite having_topanchors; only when setting as "Mark"/"Non-spacing" would the attachment workThis was evident from the generated UFO
lib.plist<key>public.openTypeCategories</key>as well as keys in thegliffiles.Would it not make sense to at least warn, or even overwrite, those categories written to the UFO, if they are contradicting with the anchors found in those glyphs?
Where is the exact code for how categories/subcategories get sorted into base/mark openTypeCategories and is a straight mapping the best metric here, seeing as GlyphsApp "guesses" wrong or uses categories that contradict the anchors?
I'm thinking, simply: