PATCH: old freetype patch / FT_Get_First_Char

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The freetype2 we shipped with SuSE 7.3 and 8.0 do not have
FT_Get_First_Char, so I have added a dynamic check.

Ciao, Marcus

Changelog:
	Older versions of freetype do not have FT_Get_First_Char.

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)) {

Attachment: pgp00198.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux