googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
239 stars 19 forks source link

color_glyph: remove assertion that width > 0 #412

Closed anthrotype closed 2 years ago

anthrotype commented 2 years ago

it's valid for fonts to have glyphs with zero advance width, e.g. combining marks

I stumbled on this while running maximum_color on a yet-to-be-published color font project, after exporting from Glyphs.app as an OT-SVG.

I wonder why the assertion was put that to begin with. Is it because when width is 0, a bitmap CBDT glyph would otherwise completely disappear (https://github.com/googlefonts/nanoemoji/issues/402)?

rsheeter commented 2 years ago

Is it because when width is 0, a bitmap CBDT glyph would otherwise completely disappear

I think this was true but iirc should no longer be. In any case, definitely a bad assert, good catch.