Module: wine Branch: master Commit: 4fa2945544e0ee1e00b5a9ae283a527e023dcb5b URL: http://source.winehq.org/git/wine.git/?a=commit;h=4fa2945544e0ee1e00b5a9ae28...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Jun 1 13:49:05 2012 +0900
gdi32/tests: GetGlyphOutline should fail for a bitmap font.
---
dlls/gdi32/tests/font.c | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index f50d1bc..e15ba6f 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -876,6 +876,7 @@ static void test_bitmap_font_metrics(void)
for(bit = 0; bit < 32; bit++) { + GLYPHMETRICS gm; DWORD fs[2]; BOOL bRet;
@@ -904,16 +905,11 @@ static void test_bitmap_font_metrics(void)
hfont = create_font(lf.lfFaceName, &lf); old_hfont = SelectObject(hdc, hfont); - bRet = GetTextMetrics(hdc, &tm); - ok(bRet, "GetTextMetrics error %d\n", GetLastError());
SetLastError(0xdeadbeef); ret = GetTextFace(hdc, sizeof(face_name), face_name); ok(ret, "GetTextFace error %u\n", GetLastError());
- SetLastError(0xdeadbeef); - ret = GetTextCharset(hdc); - if (lstrcmp(face_name, fd[i].face_name) != 0) { ok(ret != ANSI_CHARSET, "font charset should not be ANSI_CHARSET\n"); @@ -924,6 +920,19 @@ static void test_bitmap_font_metrics(void) continue; }
+ memset(&gm, 0, sizeof(gm)); + SetLastError(0xdeadbeef); + ret = GetGlyphOutline(hdc, 'A', GGO_METRICS, &gm, 0, NULL, &mat); + todo_wine { + ok(ret == GDI_ERROR, "GetGlyphOutline should fail for a bitmap font\n"); + ok(GetLastError() == ERROR_CAN_NOT_COMPLETE, "expected ERROR_CAN_NOT_COMPLETE, got %u\n", GetLastError()); + } + + bRet = GetTextMetrics(hdc, &tm); + ok(bRet, "GetTextMetrics error %d\n", GetLastError()); + + SetLastError(0xdeadbeef); + ret = GetTextCharset(hdc); ok(ret == expected_cs, "got charset %d, expected %d\n", ret, expected_cs);
trace("created %s, height %d charset %x dpi %d\n", face_name, tm.tmHeight, tm.tmCharSet, tm.tmDigitizedAspectX);