Byeongsik Jeon : gdi32: Remove the code that doesn' t work as intended around FcFontList().

Alexandre Julliard julliard at winehq.org
Mon Oct 29 18:26:30 CDT 2018


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

Author: Byeongsik Jeon <bsjeon at hanmail.net>
Date:   Mon Oct 29 21:50:20 2018 +0900

gdi32: Remove the code that doesn't work as intended around FcFontList().

Signed-off-by: Byeongsik Jeon <bsjeon at hanmail.net>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/freetype.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 7cc42b2..e37880a 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -176,9 +176,6 @@ MAKE_FUNCPTR(FcConfigSubstitute);
 MAKE_FUNCPTR(FcFontList);
 MAKE_FUNCPTR(FcFontSetDestroy);
 MAKE_FUNCPTR(FcInit);
-MAKE_FUNCPTR(FcObjectSetAdd);
-MAKE_FUNCPTR(FcObjectSetCreate);
-MAKE_FUNCPTR(FcObjectSetDestroy);
 MAKE_FUNCPTR(FcPatternCreate);
 MAKE_FUNCPTR(FcPatternDestroy);
 MAKE_FUNCPTR(FcPatternGetBool);
@@ -2796,9 +2793,6 @@ static void init_fontconfig(void)
     LOAD_FUNCPTR(FcFontList);
     LOAD_FUNCPTR(FcFontSetDestroy);
     LOAD_FUNCPTR(FcInit);
-    LOAD_FUNCPTR(FcObjectSetAdd);
-    LOAD_FUNCPTR(FcObjectSetCreate);
-    LOAD_FUNCPTR(FcObjectSetDestroy);
     LOAD_FUNCPTR(FcPatternCreate);
     LOAD_FUNCPTR(FcPatternDestroy);
     LOAD_FUNCPTR(FcPatternGetBool);
@@ -2829,7 +2823,6 @@ static void init_fontconfig(void)
 static void load_fontconfig_fonts(void)
 {
     FcPattern *pat;
-    FcObjectSet *os;
     FcFontSet *fontset;
     int i, len;
     char *file;
@@ -2838,13 +2831,15 @@ static void load_fontconfig_fonts(void)
     if (!fontconfig_enabled) return;
 
     pat = pFcPatternCreate();
-    os = pFcObjectSetCreate();
-    pFcObjectSetAdd(os, FC_FILE);
-    pFcObjectSetAdd(os, FC_SCALABLE);
-    pFcObjectSetAdd(os, FC_ANTIALIAS);
-    pFcObjectSetAdd(os, FC_RGBA);
-    fontset = pFcFontList(NULL, pat, os);
-    if(!fontset) return;
+    if (!pat) return;
+
+    fontset = pFcFontList(NULL, pat, NULL);
+    if (!fontset)
+    {
+        pFcPatternDestroy(pat);
+        return;
+    }
+
     for(i = 0; i < fontset->nfont; i++) {
         FcBool scalable;
         DWORD aa_flags;
@@ -2875,7 +2870,6 @@ static void load_fontconfig_fonts(void)
                           ADDFONT_EXTERNAL_FONT | ADDFONT_ADD_TO_CACHE | ADDFONT_AA_FLAGS(aa_flags) );
     }
     pFcFontSetDestroy(fontset);
-    pFcObjectSetDestroy(os);
     pFcPatternDestroy(pat);
 }
 




More information about the wine-cvs mailing list