mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 19:02:59 +00:00
remove broken glyphs workaround in freetype2 font engine
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
9d02c82177
commit
de6a4d137c
1 changed files with 3 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue