Ilya Shpigor : gdi32: Test for font creation with the OEM charset.
Module: wine Branch: master Commit: f91d61a529bc730f71f9745e1856420ce8c6a266 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f91d61a529bc730f71f9745e18... Author: Ilya Shpigor <shpigor(a)etersoft.ru> Date: Wed Dec 30 13:44:21 2009 +0300 gdi32: Test for font creation with the OEM charset. --- dlls/gdi32/tests/font.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 60c42a1..904f0d0 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2845,6 +2845,29 @@ static void test_orientation(void) DeleteDC(hdc); } +static void test_oemcharset(void) +{ + HDC hdc; + LOGFONTA lf; + HFONT hfont, old_hfont; + int charset; + + hdc = CreateCompatibleDC(0); + ZeroMemory(&lf, sizeof(lf)); + lf.lfHeight = 12; + lf.lfCharSet = OEM_CHARSET; + lf.lfPitchAndFamily = FIXED_PITCH | FF_MODERN; + lstrcpyA(lf.lfFaceName, "Terminal"); + hfont = CreateFontIndirectA(&lf); + old_hfont = SelectObject(hdc, hfont); + charset = GetTextCharset(hdc); +todo_wine + ok(charset == OEM_CHARSET, "expected %d charset, got %d\n", OEM_CHARSET, charset); + SelectObject(hdc, old_hfont); + DeleteObject(hfont); + DeleteDC(hdc); +} + static void test_GetGlyphOutline(void) { MAT2 mat = { {0,1}, {0,0}, {0,0}, {0,1} }; @@ -3054,4 +3077,5 @@ START_TEST(font) test_GetTextMetrics2("Arial", -55); test_GetTextMetrics2("Arial", -110); test_CreateFontIndirect(); + test_oemcharset(); }
participants (1)
-
Alexandre Julliard