Support winding fonts like Windows does
Map Latin-1 characters to the Winding unicode entries for symbol fonts to render those fonts like Windows does. Pick-to: 5.15 Fixes: QTBUG-84409 Change-Id: I60b81d93412d970d25a98606545773db6c8ab723 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>bb10
parent
33e6e5fac3
commit
6a31a7b024
|
|
@ -1510,6 +1510,8 @@ glyph_t QFontEngineFT::glyphIndex(uint ucs4) const
|
|||
FT_Set_Charmap(face, freetype->symbol_map);
|
||||
glyph = FT_Get_Char_Index(face, ucs4);
|
||||
FT_Set_Charmap(face, freetype->unicode_map);
|
||||
if (!glyph && symbol && ucs4 < 0x100)
|
||||
glyph = FT_Get_Char_Index(face, ucs4 + 0xf000);
|
||||
}
|
||||
}
|
||||
if (ucs4 < QFreetypeFace::cmapCacheSize)
|
||||
|
|
@ -1553,6 +1555,8 @@ bool QFontEngineFT::stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs
|
|||
FT_Set_Charmap(face, freetype->symbol_map);
|
||||
glyph = FT_Get_Char_Index(face, uc);
|
||||
FT_Set_Charmap(face, freetype->unicode_map);
|
||||
if (!glyph && symbol && uc < 0x100)
|
||||
glyph = FT_Get_Char_Index(face, uc + 0xf000);
|
||||
}
|
||||
glyphs->glyphs[glyph_pos] = glyph;
|
||||
if (uc < QFreetypeFace::cmapCacheSize)
|
||||
|
|
|
|||
Loading…
Reference in New Issue