Closed schriftgestalt closed 3 months ago
not sure what you're doing, but in UFO glyphs height is never None, it defaults to 0 (I know that is arguable but I don't think fontMath is the place to fix this)
glyphsLib (or fontMake or whatever) is not setting it correctly in all cases. And I still think it should be able to be None (I know we discussed this).
both ufoLib2 and defcon defaults height to 0
https://github.com/fonttools/ufoLib2/blob/45597f82b7f2fa8f61748eed0cb29c6fabd07c48/src/ufoLib2/objects/glyph.py#L70 https://github.com/robotools/defcon/blob/32c956cabe3ca6aaeea69ddeaade5c6d0903ae91/Lib/defcon/objects/glyph.py#L123
can you check what type of glyph objects are being passed on to MathGlyph?
As far as I can see, those are ufoLib2.objects.glyph.Glyph
.
that's weird, that line I linked above ensures the height is initialized to 0 if not set. Something else might be setting it to None... glyphsLib?
I’ll dig into this.
I had a messed up ufoLib2. it had this:
height: Optional[float] = None
instead of
height: float = 0
I think it should be like I had it, but I’m quiet now.
Closing per discussion above.
Codecov Report
89.38% <50.00%> (-0.08%)
Flags with carried forward coverage won't be shown. Click here to find out more.
84.36% <50.00%> (-0.35%)
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more