fonts: don't ever return a bitmap font if we can't use it

Huw D M Davies h.davies1 at physics.ox.ac.uk
Wed Aug 11 06:17:29 CDT 2004


        Huw Davies <huw at codeweavers.com>
        Don't ever return a bitmap font if the driver can't use it.        
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/gdi/freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.69
diff -u -r1.69 freetype.c
--- dlls/gdi/freetype.c	10 Aug 2004 23:42:18 -0000	1.69
+++ dlls/gdi/freetype.c	11 Aug 2004 11:14:17 -0000
@@ -1726,9 +1726,18 @@
     }
 
     if(!family) {
-        family = FontList;
-	csi.fs.fsCsb[0] = 0;
-	FIXME("just using first face for now\n");
+        for(family = FontList; family; family = family->next) {
+            if(family->FirstFace->scalable || can_use_bitmap) {
+                csi.fs.fsCsb[0] = 0;
+                break;
+                FIXME("just using first face for now\n");
+            }
+        }
+        if(!family) {
+            FIXME("can't find a single appropriate font - bailing\n");
+            free_font(ret);
+            return NULL;
+        }
     }
 
     it = lf.lfItalic ? 1 : 0;



More information about the wine-patches mailing list