Alexandre Julliard : winex11: Allow the Xft configuration to override both registry and fontconfig parameters .
Alexandre Julliard
julliard at winehq.org
Mon May 24 11:30:50 CDT 2010
Module: wine
Branch: master
Commit: c30688c4d2e265216e4a30a809b6116e23297648
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c30688c4d2e265216e4a30a809b6116e23297648
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon May 24 12:34:55 2010 +0200
winex11: Allow the Xft configuration to override both registry and fontconfig parameters.
---
dlls/winex11.drv/xrender.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 087da2b..b13f2e4 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -964,6 +964,30 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz)
pFcPatternDestroy( pattern );
}
#endif /* SONAME_LIBFONTCONFIG */
+
+ /* now check Xft resources */
+ {
+ char *value;
+ BOOL antialias = TRUE;
+
+ wine_tsx11_lock();
+ if ((value = XGetDefault( gdi_display, "Xft", "antialias" )))
+ {
+ if (tolower(value[0]) == 'f' || tolower(value[0]) == 'n' ||
+ value[0] == '0' || !strcasecmp( value, "off" ))
+ antialias = FALSE;
+ }
+ if ((value = XGetDefault( gdi_display, "Xft", "rgba" )))
+ {
+ TRACE( "Xft resource returned rgba '%s' antialias %u\n", value, antialias );
+ if (!strcmp( value, "rgb" )) entry->aa_default = AA_RGB;
+ else if (!strcmp( value, "bgr" )) entry->aa_default = AA_BGR;
+ else if (!strcmp( value, "vrgb" )) entry->aa_default = AA_VRGB;
+ else if (!strcmp( value, "vbgr" )) entry->aa_default = AA_VBGR;
+ else if (!strcmp( value, "none" )) entry->aa_default = antialias ? AA_Grey : AA_None;
+ }
+ wine_tsx11_unlock();
+ }
}
else
entry->aa_default = AA_None;
More information about the wine-cvs
mailing list