googlefonts / ufo2ft

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

.notdef not automatically being generated #530

Closed robmck-ms closed 3 years ago

robmck-ms commented 3 years ago

I've got a font that doesn't have a .notdef in the UFO sources. When I build a VF, the .notdef glyph is blank.

Prior to commit 259071e4bd123ba0219e4184409f0c711888b9b7, it generated outlines, AW, etc for .notdef. Beginning in this commit, the glyph is blank (which causes a failure in my unit tests).

The commit looks pretty simple: converting from TTGlyphPen to TTGlyphPointPen, with appropriate changes to calling draw method from draw() to drawPoints(). One thing I notice is that in the constructor for StubGlyph has a special case for .notdef that assigns self.draw = _drawDefaultNotdef, however doesn't modify self.drawPoints. Could that be the problem?

I'm not versed enough in pens to have fixed it (or at least my attempts failed), so I don't know if that's the problem nor have a PR for you.

jenskutilek commented 3 years ago

Your analysis is spot on. I have fixed it.