gdi32/tests: Test rotating lines of text
Alexander Morozov
amorozov at etersoft.ru
Tue Jul 15 05:00:41 CDT 2008
This test demonstrates a problem with rotating lines of text. On Wine a line
width is decreasing when a rotation angle is increasing.
-------------- next part --------------
From 205aeb31f6efeefd09563440d5c7a65c69aae3a5 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov at etersoft.ru>
Date: Tue, 15 Jul 2008 13:47:24 +0400
Subject: [PATCH] gdi32/tests: Test rotating lines of text
---
dlls/gdi32/tests/font.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index d143949..d1a97b7 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -361,7 +361,7 @@ static void test_outline_font(void)
LOGFONTA lf;
HFONT hfont, old_hfont;
OUTLINETEXTMETRICA otm;
- SIZE size_orig;
+ SIZE size_orig, size;
INT width_orig, height_orig, lfWidth;
XFORM xform;
GLYPHMETRICS gm;
@@ -404,6 +404,20 @@ static void test_outline_font(void)
SelectObject(hdc, old_hfont);
DeleteObject(hfont);
+ /* test rotating */
+ for (lf.lfEscapement = 900; lf.lfEscapement != 0; lf.lfEscapement -= 100)
+ {
+ hfont = create_font("rotation", &lf);
+ old_hfont = SelectObject(hdc, hfont);
+ ok(GetTextExtentPoint32A(hdc, test_str, sizeof(test_str), &size),
+ "GetTextExtentPoint32A failed\n");
+ todo_wine
+ ok((float) size.cx/size_orig.cx < 1.001 && (float) size.cx/size_orig.cx > 0.999,
+ "size.cx %d differs markedly from %d\n", size.cx, size_orig.cx);
+ SelectObject(hdc, old_hfont);
+ DeleteObject(hfont);
+ }
+
height_orig = otm.otmTextMetrics.tmHeight;
lfWidth = otm.otmTextMetrics.tmAveCharWidth;
--
1.5.4.5.GIT
More information about the wine-patches
mailing list