gdiplus: Fix Font test failure on charset mismatch
Nikolay Sivov
bunglehead at gmail.com
Mon Dec 15 20:17:35 CST 2008
Two Font tests fail when charset differs from ANSI_CHARSET.
Patch fixes crosstests and set lfCharSet field when GdipCreateFontFromLogfontW is used.
Changelog:
- Fix Font test failure (charset mismatch)
>From 58cc344b375e5bd677364cd166f64cea4e392d2e Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Tue, 16 Dec 2008 05:10:48 +0300
Subject: Fix Font test failure (charset mismatch)
---
dlls/gdiplus/font.c | 1 +
dlls/gdiplus/tests/font.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 220409b..22fd393 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -195,6 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
(*font)->lfw.lfHeight = -textmet.tmHeight;
(*font)->lfw.lfWeight = textmet.tmWeight;
+ (*font)->lfw.lfCharSet = textmet.tmCharSet;
(*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */
(*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading;
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 7ff5afc..125535d 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -134,7 +134,7 @@ static void test_logfont(void)
expect(0, lfw2.lfItalic);
expect(0, lfw2.lfUnderline);
expect(0, lfw2.lfStrikeOut);
- expect(0, lfw2.lfCharSet);
+ expect(GetTextCharset(hdc), lfw2.lfCharSet);
expect(0, lfw2.lfOutPrecision);
expect(0, lfw2.lfClipPrecision);
expect(0, lfw2.lfQuality);
@@ -164,7 +164,7 @@ static void test_logfont(void)
expect(TRUE, lfw2.lfItalic);
expect(TRUE, lfw2.lfUnderline);
expect(TRUE, lfw2.lfStrikeOut);
- expect(0, lfw2.lfCharSet);
+ expect(GetTextCharset(hdc), lfw2.lfCharSet);
expect(0, lfw2.lfOutPrecision);
expect(0, lfw2.lfClipPrecision);
expect(0, lfw2.lfQuality);
--
1.4.4.4
More information about the wine-patches
mailing list