Alexandre Julliard : gdi32: Set the font anti-aliasing flags from the fontconfig information if available .
Alexandre Julliard
julliard at winehq.org
Fri Nov 2 15:52:02 CDT 2012
Module: wine
Branch: master
Commit: 9d888b371fe93eeda0f2915e133a9fca329c35d8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9d888b371fe93eeda0f2915e133a9fca329c35d8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Nov 2 19:46:18 2012 +0100
gdi32: Set the font anti-aliasing flags from the fontconfig information if available.
---
dlls/gdi32/freetype.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index a70b853..98c7b40 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -345,6 +345,7 @@ struct tagGdiFont {
SHORT yMax;
SHORT yMin;
DWORD ntmFlags;
+ DWORD aa_flags;
UINT ntmCellHeight, ntmAvgWidth;
FONTSIGNATURE fs;
GdiFont *base_font;
@@ -4544,8 +4545,6 @@ static HFONT freetype_SelectFont( PHYSDEV dev, HFONT hfont, UINT *aa_flags )
GetObjectW( hfont, sizeof(lf), &lf );
lf.lfWidth = abs(lf.lfWidth);
- if (!*aa_flags) *aa_flags = get_font_aa_flags( dev->hdc, &lf );
-
can_use_bitmap = GetDeviceCaps(dev->hdc, TEXTCAPS) & TC_RA_ABLE;
TRACE("%s, h=%d, it=%d, weight=%d, PandF=%02x, charset=%d orient %d escapement %d\n",
@@ -4946,6 +4945,7 @@ found_face:
TRACE("Loaded GSUB table of %i bytes\n",length);
}
}
+ ret->aa_flags = face->aa_flags;
TRACE("caching: gdiFont=%p hfont=%p\n", ret, hfont);
@@ -4953,6 +4953,9 @@ found_face:
done:
if (ret)
{
+ if (!*aa_flags) *aa_flags = ret->aa_flags;
+ if (!*aa_flags) *aa_flags = get_font_aa_flags( dev->hdc, &lf );
+
/* fixup the antialiasing flags for that font */
switch (*aa_flags)
{
More information about the wine-cvs
mailing list