skip unknown glyphs

This commit is contained in:
Konstantin Käfer
2014-02-06 09:47:12 +01:00
parent ad50fa56e7
commit ed4072bdd1

View File

@@ -26,7 +26,13 @@ void DebugFontBuffer::addText(const char *text, double left, double baseline, do
if (text[i] < 32 || text[i] > 127) {
continue;
}
glyph& glyph = simplex[(int)text[i]];
auto it = simplex.find((int)text[i]);
if (it == simplex.end()) {
continue;
}
const glyph& glyph = it->second;
if (!glyph.width) {
continue;
}