Huw Davies : gdi32: Set the font family as FF_MODERN if the panose marks it as monospaced.
Alexandre Julliard
julliard at winehq.org
Thu Feb 19 09:18:47 CST 2009
Module: wine
Branch: master
Commit: 4f2572385303f20181dd1aa18d79b075b2218d8a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f2572385303f20181dd1aa18d79b075b2218d8a
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Feb 19 10:41:34 2009 +0000
gdi32: Set the font family as FF_MODERN if the panose marks it as monospaced.
---
dlls/gdi32/freetype.c | 3 ++-
dlls/gdi32/tests/font.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index 57bb40b..711f259 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -5463,7 +5463,8 @@ UINT WineEngGetOutlineTextMetrics(GdiFont *font, UINT cbSize,
case PAN_FAMILY_PICTORIAL: /* symbol fonts get treated as if they were text */
/* which is clearly not what the panose spec says. */
default:
- if(TM.tmPitchAndFamily == 0) /* fixed */
+ if(TM.tmPitchAndFamily == 0 || /* fixed */
+ pOS2->panose[PAN_PROPORTION_INDEX] == PAN_PROP_MONOSPACED)
TM.tmPitchAndFamily = FF_MODERN;
else
{
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c
index badd572..5ceef85 100644
--- a/dlls/gdi32/tests/font.c
+++ b/dlls/gdi32/tests/font.c
@@ -2387,7 +2387,8 @@ static void test_text_metrics(const LOGFONTA *lf)
case PAN_FAMILY_TEXT_DISPLAY:
case PAN_FAMILY_PICTORIAL:
default:
- if((tmA.tmPitchAndFamily & 1) == 0) /* fixed */
+ if((tmA.tmPitchAndFamily & 1) == 0 || /* fixed */
+ tt_os2.panose.bProportion == PAN_PROP_MONOSPACED)
{
expect_ff(&tmA, &tt_os2, FF_MODERN, font_name);
break;
More information about the wine-cvs
mailing list