fonts: fix for some symbol fonts
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Tue Dec 9 01:47:09 CST 2003
Huw Davies <huw at codeweavers.com>
If a font has a version 0 OS2 table then Windows uses
ANSI_CHARSET if the first charcode < 0x100, else it uses
SYMBOL_CHARSET. Based on a patch by Rein Klazes.
--
Huw Davies
huw at codeweavers.com
Index: dlls/gdi/freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.46
diff -u -r1.46 freetype.c
--- dlls/gdi/freetype.c 8 Dec 2003 21:53:15 -0000 1.46
+++ dlls/gdi/freetype.c 9 Dec 2003 07:41:54 -0000
@@ -96,6 +96,7 @@
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);
@@ -398,6 +399,14 @@
(*insertface)->fs.fsUsb[0], (*insertface)->fs.fsUsb[1],
(*insertface)->fs.fsUsb[2], (*insertface)->fs.fsUsb[3]);
+ if(pOS2->version == 0) {
+ FT_UInt dummy;
+ if(pFT_Get_First_Char( ft_face, &dummy ) < 0x100)
+ (*insertface)->fs.fsCsb[0] |= 1;
+ else
+ (*insertface)->fs.fsCsb[0] |= 1L << 31;
+ }
+
if((*insertface)->fs.fsCsb[0] == 0) { /* let's see if we can find any interesting cmaps */
for(i = 0; i < ft_face->num_charmaps; i++) {
switch(ft_face->charmaps[i]->encoding) {
@@ -769,6 +778,7 @@
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)
More information about the wine-patches
mailing list