Aric Stewart : gdi32/tests: Do not try to test OS/ 2 win metrics on non-windows fonts.
Alexandre Julliard
julliard at winehq.org
Wed May 29 14:47:34 CDT 2013
Module: wine
Branch: master
Commit: 3108f3cf3d99aac1983cc5256afa87752899275e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3108f3cf3d99aac1983cc5256afa87752899275e
Author: Aric Stewart <aric at codeweavers.com>
Date: Wed May 29 06:53:51 2013 -0500
gdi32/tests: Do not try to test OS/2 win metrics on non-windows fonts.
---
dlls/gdi32/tests/font.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index fdb6451..b57a630 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -3077,19 +3077,13 @@ static void test_text_metrics(const LOGFONT *lf, const NEWTEXTMETRIC *ntm)
ret = GetFontData(hdc, MS_OS2_TAG, 0, &tt_os2, size);
ok(ret == size, "GetFontData should return %u not %u\n", size, ret);
- ascent = GET_BE_WORD(tt_os2.usWinAscent);
- descent = GET_BE_WORD(tt_os2.usWinDescent);
- cell_height = ascent + descent;
- ok(ntm->ntmCellHeight == cell_height, "%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u\n",
- font_name, ntm->ntmCellHeight, cell_height, ascent, descent);
-
SetLastError(0xdeadbeef);
ret = GetTextMetricsA(hdc, &tmA);
ok(ret, "GetTextMetricsA error %u\n", GetLastError());
if(!get_first_last_from_cmap(hdc, &cmap_first, &cmap_last, &cmap_type))
{
- skip("Unable to retrieve first and last glyphs from cmap\n");
+ skip("%s is not a Windows font, OS/2 metrics may be invalid.\n",font_name);
}
else
{
@@ -3099,6 +3093,12 @@ static void test_text_metrics(const LOGFONT *lf, const NEWTEXTMETRIC *ntm)
USHORT version;
TEXTMETRICW tmW;
+ ascent = GET_BE_WORD(tt_os2.usWinAscent);
+ descent = GET_BE_WORD(tt_os2.usWinDescent);
+ cell_height = ascent + descent;
+ ok(ntm->ntmCellHeight == cell_height, "%s: ntmCellHeight %u != %u, os2.usWinAscent/os2.usWinDescent %u/%u\n",
+ font_name, ntm->ntmCellHeight, cell_height, ascent, descent);
+
version = GET_BE_WORD(tt_os2.version);
os2_first_char = GET_BE_WORD(tt_os2.usFirstCharIndex);
More information about the wine-cvs
mailing list