FT_Face face;
if (FT_New_Face(library, font_list[i].c_str(), 0, &face)) {
fprintf(stderr, "Warning: Couldn't open '%s', some glyphs might not be available\n", font_list[i].c_str());
+ } else {
+ faces[font_list[i]] = face;
}
- faces[font_list[i]] = face;
}
}
}
ypos = ypos * screen_height / LOGICAL_SCREEN_HEIGHT;
for (widestring::const_iterator i = str.begin(); i != str.end(); ++i) {
- int glyph_index;
+ int glyph_index = 0;
for (std::vector<FT_Face>::const_iterator j = fonts.begin(); j != fonts.end(); ++j) {
glyph_index = FT_Get_Char_Index(*j, *i);
if (glyph_index == 0)
break;
}
if (glyph_index == 0) {
- std::fprintf(stderr, "Warning: Could not find a glyph in any font for U+%x, ignoring\n", *i);
+ std::fprintf(stderr, "Warning: Could not find a glyph in any font for U+%04x, ignoring\n", *i);
continue;
}