fonts: GetTextExtentExPointA

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

 



        Aric Stewart <aric@xxxxxxxxxxxxxxx>
        Testing with Japanese windows and multibyte characters has shown that
        lpnFit is _not_ characters but actaully bytes
-- 
Huw Davies
huw@xxxxxxxxxxxxxxx
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;
 }


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

  Powered by Linux