From 658537361176907cc7e8a0cedaad4e92740053e1 Mon Sep 17 00:00:00 2001 From: TANABE Hiroshi Date: Tue, 22 Feb 2005 19:37:18 +0000 Subject: [PATCH] Added Multibyte character set support in GetGlyphOutlineA. --- dlls/gdi/font.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/gdi/font.c b/dlls/gdi/font.c index eaa654235c7..a112f5ebac7 100644 --- a/dlls/gdi/font.c +++ b/dlls/gdi/font.c @@ -1935,7 +1935,17 @@ DWORD WINAPI GetGlyphOutlineA( HDC hdc, UINT uChar, UINT fuFormat, UINT c; if(!(fuFormat & GGO_GLYPH_INDEX)) { - p = FONT_mbtowc(hdc, (char*)&uChar, 1, NULL, NULL); + int len; + char mbchs[2]; + if(uChar > 0xff) { /* but, 2 bytes character only */ + len = 2; + mbchs[0] = (uChar & 0xff00) >> 8; + mbchs[1] = (uChar & 0xff); + } else { + len = 1; + mbchs[0] = (uChar & 0xff); + } + p = FONT_mbtowc(hdc, mbchs, len, NULL, NULL); c = p[0]; } else c = uChar;