From 4d9a31177113f53407595f055ea3dbdc6df6bcf9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 29 Jun 2010 14:58:31 +0200 Subject: [PATCH] winex11: Disable antialiasing if either fontconfig or Xft disable it explicitly. --- dlls/winex11.drv/xrender.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 2fc804acdad..4f900b2f7bf 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -905,6 +905,7 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz) break; } + font_smoothing = TRUE; /* default to enabled */ #ifdef SONAME_LIBFONTCONFIG if (fontconfig_installed) { @@ -956,9 +957,10 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz) case FC_RGBA_BGR: entry->aa_default = AA_BGR; break; case FC_RGBA_VRGB: entry->aa_default = AA_VRGB; break; case FC_RGBA_VBGR: entry->aa_default = AA_VBGR; break; - case FC_RGBA_NONE: entry->aa_default = antialias ? AA_Grey : AA_None; break; + case FC_RGBA_NONE: entry->aa_default = AA_Grey; break; } } + if (!antialias) font_smoothing = FALSE; pFcPatternDestroy( match ); } pFcPatternDestroy( pattern ); @@ -984,11 +986,14 @@ static int GetCacheEntry(X11DRV_PDEVICE *physDev, LFANDSIZE *plfsz) 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; + else if (!strcmp( value, "none" )) entry->aa_default = AA_Grey; } wine_tsx11_unlock(); + if (!antialias) font_smoothing = FALSE; } + if (!font_smoothing) entry->aa_default = AA_None; + /* we can't support subpixel without xrender */ if (!X11DRV_XRender_Installed && entry->aa_default > AA_Grey) entry->aa_default = AA_Grey; } -- 2.11.4.GIT