diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 81257b73f..b99938637 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -345,19 +345,15 @@ bool QFontEngineFT::loadGlyph(glyph_t glyph, int load_flags) const { FT_Face face = freetype->face; FT_Error err = FT_Load_Glyph(face, glyph, load_flags); - if (err == FT_Err_Too_Few_Arguments) { - // this is an error in the bytecode interpreter, just try to run without it - load_flags |= FT_LOAD_FORCE_AUTOHINT; - err = FT_Load_Glyph(face, glyph, load_flags); + if (Q_UNLIKELY(err != FT_Err_Ok)) { + qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph); + return false; } FT_GlyphSlot slot = face->glyph; if (Q_UNLIKELY(slot->format != FT_GLYPH_FORMAT_OUTLINE)) { qWarning("non-outline format is not supported format=%d face=%p, glyph=%d", slot->format, face, glyph); return false; - } else if (Q_UNLIKELY(err != FT_Err_Ok)) { - qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph); - return false; } if (embolden) {