Fix of bad font glyph shape

This commit is contained in:
Filip Sykala - NTB T15p 2022-11-03 14:55:49 +01:00
parent 59fc9328f4
commit d2da63db41

View File

@ -452,7 +452,8 @@ std::optional<Emboss::Glyph> priv::get_glyph(const stbtt_fontinfo &font_info, in
std::reverse(pts.begin(), pts.end());
glyph_polygons.emplace_back(pts);
}
glyph.shape = Emboss::heal_shape(glyph_polygons);
if (!glyph_polygons.empty())
glyph.shape = Emboss::heal_shape(glyph_polygons);
return glyph;
}