PATCH: old freetype patch / FT_Get_First_Char

Marcus Meissner meissner at suse.de
Mon Dec 15 04:32:59 CST 2003


On Mon, Dec 15, 2003 at 11:20:13AM +0100, Pouech Eric DMI AEI CAEN wrote:
> > +            if(!!pFT_Get_First_Char || (pFT_Get_First_Char( ft_face, &dummy ) < 0x100))
> 
> me thinks two bangs are one too much

Umm, yes.

Ciao, Marcus

Index: freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.47
diff -u -r1.47 freetype.c
--- dlls/gdi/freetype.c	10 Dec 2003 00:36:22 -0000	1.47
+++ dlls/gdi/freetype.c	15 Dec 2003 09:21:08 -0000
@@ -96,7 +96,6 @@
 MAKE_FUNCPTR(FT_Vector_Unit);
 MAKE_FUNCPTR(FT_Done_Face);
 MAKE_FUNCPTR(FT_Get_Char_Index);
-MAKE_FUNCPTR(FT_Get_First_Char);
 MAKE_FUNCPTR(FT_Get_Sfnt_Table);
 MAKE_FUNCPTR(FT_Init_FreeType);
 MAKE_FUNCPTR(FT_Load_Glyph);
@@ -111,6 +110,7 @@
 MAKE_FUNCPTR(FT_Vector_Transform);
 static void (*pFT_Library_Version)(FT_Library,FT_Int*,FT_Int*,FT_Int*);
 static FT_Error (*pFT_Load_Sfnt_Table)(FT_Face,FT_ULong,FT_Long,FT_Byte*,FT_ULong*);
+static FT_ULong (*pFT_Get_First_Char)(FT_Face,FT_UInt*);
 
 #ifdef HAVE_FONTCONFIG_FONTCONFIG_H
 #include <fontconfig/fontconfig.h>
@@ -401,7 +409,9 @@
 
         if(pOS2->version == 0) {
             FT_UInt dummy;
-            if(pFT_Get_First_Char( ft_face, &dummy ) < 0x100)
+	
+	    /* If the function is not there, we assume the font is ok */
+            if(!pFT_Get_First_Char || (pFT_Get_First_Char( ft_face, &dummy ) < 0x100))
                 (*insertface)->fs.fsCsb[0] |= 1;
             else
                 (*insertface)->fs.fsCsb[0] |= 1L << 31;
@@ -778,7 +789,6 @@
     LOAD_FUNCPTR(FT_Vector_Unit)
     LOAD_FUNCPTR(FT_Done_Face)
     LOAD_FUNCPTR(FT_Get_Char_Index)
-    LOAD_FUNCPTR(FT_Get_First_Char)
     LOAD_FUNCPTR(FT_Get_Sfnt_Table)
     LOAD_FUNCPTR(FT_Init_FreeType)
     LOAD_FUNCPTR(FT_Load_Glyph)
@@ -796,6 +806,7 @@
     /* Don't warn if this one is missing */
     pFT_Library_Version = wine_dlsym(ft_handle, "FT_Library_Version", NULL, 0);
     pFT_Load_Sfnt_Table = wine_dlsym(ft_handle, "FT_Load_Sfnt_Table", NULL, 0);
+    pFT_Get_First_Char = wine_dlsym(ft_handle, "FT_Get_First_Char", NULL, 0);
 
       if(!wine_dlsym(ft_handle, "FT_Get_Postscript_Name", NULL, 0) &&
 	 !wine_dlsym(ft_handle, "FT_Sqrt64", NULL, 0)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20031215/fb3a65e6/attachment.pgp


More information about the wine-devel mailing list