Huw Davies <huw@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx 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)