Akihiro Sagawa : gdi32: Use the helper function in GetCharABCWidthsFloatA to support DBCS.
Alexandre Julliard
julliard at winehq.org
Mon Jan 17 10:59:49 CST 2011
Module: wine
Branch: master
Commit: ac66c575238a9bcd3a0a0a6fc6679421f1ec2d77
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac66c575238a9bcd3a0a0a6fc6679421f1ec2d77
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Sun Jan 16 23:00:29 2011 +0900
gdi32: Use the helper function in GetCharABCWidthsFloatA to support DBCS.
---
dlls/gdi32/font.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c
index 966d3dd..5dc2132 100644
--- a/dlls/gdi32/font.c
+++ b/dlls/gdi32/font.c
@@ -3005,19 +3005,16 @@ GetCharacterPlacementW(
*/
BOOL WINAPI GetCharABCWidthsFloatA( HDC hdc, UINT first, UINT last, LPABCFLOAT abcf )
{
- INT i, wlen, count = (INT)(last - first + 1);
+ INT i, wlen;
LPSTR str;
LPWSTR wstr;
BOOL ret = TRUE;
- if (count <= 0) return FALSE;
-
- str = HeapAlloc(GetProcessHeap(), 0, count);
-
- for(i = 0; i < count; i++)
- str[i] = (BYTE)(first + i);
+ str = FONT_GetCharsByRangeA(first, last, &i);
+ if (str == NULL)
+ return FALSE;
- wstr = FONT_mbtowc( hdc, str, count, &wlen, NULL );
+ wstr = FONT_mbtowc( hdc, str, i, &wlen, NULL );
for (i = 0; i < wlen; i++)
{
More information about the wine-cvs
mailing list