From bc4bbb40d16558ea22bb2b90799a71ce2a4faef1 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 1 Apr 2007 20:17:33 +0900 Subject: [PATCH] gdi32: Make GetKerningPairsA not fail for fonts with SYMBOL charset. --- dlls/gdi32/font.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/font.c b/dlls/gdi32/font.c index ea2e66c266f..263454d0572 100644 --- a/dlls/gdi32/font.c +++ b/dlls/gdi32/font.c @@ -2662,7 +2662,11 @@ DWORD WINAPI GetKerningPairsA( HDC hDC, DWORD cPairs, FIXME("Can't find codepage for charset %d\n", charset); return 0; } - if (!GetCPInfo(csi.ciACP, &cpi)) + /* GetCPInfo() will fail on CP_SYMBOL, and WideCharToMultiByte is supposed + * to fail on an invalid character for CP_SYMBOL. + */ + cpi.DefaultChar[0] = 0; + if (csi.ciACP != CP_SYMBOL && !GetCPInfo(csi.ciACP, &cpi)) { FIXME("Can't find codepage %u info\n", csi.ciACP); return 0;