fonts: GetTextExtentExPointA
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Thu Nov 13 09:09:17 CST 2003
Aric Stewart <aric at codeweavers.com>
Testing with Japanese windows and multibyte characters has shown that
lpnFit is _not_ characters but actaully bytes
--
Huw Davies
huw at codeweavers.com
Index: objects/font.c
===================================================================
RCS file: /home/wine/wine/objects/font.c,v
retrieving revision 1.109
diff -u -r1.109 font.c
--- objects/font.c 11 Nov 2003 20:39:54 -0000 1.109
+++ objects/font.c 13 Nov 2003 15:03:54 -0000
@@ -1057,6 +1057,12 @@
INT wlen;
LPWSTR p = FONT_mbtowc( hdc, str, count, &wlen, NULL);
ret = GetTextExtentExPointW( hdc, p, wlen, maxExt, lpnFit, alpDx, size);
+ /*
+ * Testing with Japanese windows and multibyte characters has shown that
+ * lpnFit is _not_ characters but actaully bytes.
+ */
+ if (lpnFit)
+ *lpnFit = WideCharToMultiByte(CP_ACP,0,p,*lpnFit,NULL,0,NULL,NULL);
HeapFree( GetProcessHeap(), 0, p );
return ret;
}
More information about the wine-patches
mailing list