Dmitry Timoshkov : gdi32: Improve detection of symbol charset for old truetype fonts.

Alexandre Julliard julliard at winehq.org
Thu Nov 29 15:33:00 CST 2018


Module: wine
Branch: master
Commit: 57c44885e57dee810814bb9bdf39f53cb8250d93
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=57c44885e57dee810814bb9bdf39f53cb8250d93

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Thu Nov 29 12:28:15 2018 +0300

gdi32: Improve detection of symbol charset for old truetype fonts.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33117
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 441a771..f50c163 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -2014,7 +2014,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;
@@ -2031,10 +2030,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
         {




More information about the wine-cvs mailing list