summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/cairotextrender.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-07-27 17:40:31 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-07-27 20:52:17 +0200
commite6538f5bdd876911ea30f84a6512c03908e620fd (patch)
treeeab7ed1e9f9c286e3c2d3a44a309c626eeab7f74 /vcl/unx/generic/gdi/cairotextrender.cxx
parente545e16d043cb583156abf9a531b4dd2542959b5 (diff)
tdf#118966 vcl: add a flag to determine if AA of fonts is used from the system
This is on by default (as there are loads of vcl users who expect font AA working even if the default is off and they don't enable it), but the svx UnoGraphicExporter disables it to make everyone happy. The reason in practice AA was on by default is that the gtk backend uses the system settings in GtkInstance::GetCairoFontOptions() (and not the AA setting from the UI), and lclGetSystemTextAntiAliasMode() does the same on Windows (at least in the direct write case). So now these defaults again have higher priority than leaving the vcl-level default unchanged. Change-Id: I81267c0b036211525ac02d3282fa89d75510f4a8 Reviewed-on: https://gerrit.libreoffice.org/58199 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'vcl/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 55316ed9926a..878abefb346b 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -219,8 +219,11 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
ImplSVData* pSVData = ImplGetSVData();
if (const cairo_font_options_t* pFontOptions = pSVData->mpDefInst->GetCairoFontOptions())
{
- if (!rGraphics.getAntiAliasB2DDraw())
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ if (!rStyleSettings.GetUseFontAAFromSystem() && !rGraphics.getAntiAliasB2DDraw())
{
+ // Disable font AA in case global AA setting is supposed to affect
+ // font rendering (not the default) and AA is disabled.
cairo_font_options_t* pOptions = cairo_font_options_copy(pFontOptions);
cairo_font_options_set_antialias(pOptions, CAIRO_ANTIALIAS_NONE);
cairo_set_font_options(cr, pOptions);