googlefonts / ufo2ft

A bridge from UFOs to FontTools objects (and therefore, OTFs and TTFs).
MIT License
152 stars 43 forks source link

KerningPair: add annotations #638

Closed madig closed 2 years ago

madig commented 2 years ago

While going through #636, I added typing annotations to help me understand.

I also found that the ast import was weird. The code uses stuff from featureWriters.ast and feaLib.ast as if they were from the same namespace. Maybe I'm too tired to understand.

There were also some opportunities to replace set([something]) by {someting}.

Todo: While looking at https://github.com/daltonmaag/ubuntu/tree/master/source/Ubuntu-B.ufo, I found that the fi glyph was considered as belonging to the Zyyy script for some reason. Weird.

anthrotype commented 2 years ago

The code uses stuff from featureWriters.ast and feaLib.ast as if they were from the same namespace

yeah that was a feature, but I see how static typechecker may get confused

anthrotype commented 2 years ago

I found that the fi glyph was considered as belonging to the Zyyy script for some reason

maybe because it's unicode is a PUA? https://github.com/daltonmaag/ubuntu/blob/f3476dcc8690b1d9cedcad8a8f2814aa7b10fdb8/source/Ubuntu-B.ufo/glyphs/fi.glif#L3

madig commented 2 years ago

maybe because it's unicode is a PUA

Oh, that must be it. Not an issue then.