[PATCH] gdi32: Improve detection of symbol charset for old truetype fonts.
Dmitry Timoshkov
dmitry at baikal.ru
Thu Nov 29 03:28:15 CST 2018
This patch uses same check for symbol charset that get_outline_text_metrics()
already does, and allows the font attached to the bug 33117 be correctly
recognized as a symbol ttf (like Windows does).
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/gdi32/freetype.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 5a4727239c..638ff941b0 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2011,7 +2011,6 @@ static inline void get_bitmap_size( FT_Face ft_face, Bitmap_Size *face_size )
static inline void get_fontsig( FT_Face ft_face, FONTSIGNATURE *fs )
{
TT_OS2 *os2;
- FT_UInt dummy;
CHARSETINFO csi;
FT_WinFNT_HeaderRec winfnt_header;
int i;
@@ -2028,10 +2027,10 @@ static inline void get_fontsig( FT_Face ft_face, FONTSIGNATURE *fs )
if (os2->version == 0)
{
- if (pFT_Get_First_Char( ft_face, &dummy ) < 0x100)
- fs->fsCsb[0] = FS_LATIN1;
- else
+ if (os2->usFirstCharIndex >= 0xf000 && os2->usFirstCharIndex < 0xf100)
fs->fsCsb[0] = FS_SYMBOL;
+ else
+ fs->fsCsb[0] = FS_LATIN1;
}
else
{
--
2.17.1
More information about the wine-devel
mailing list