summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorFrank Steiner <fsteiner-board@bio.ifi.lmu.de>2023-11-23 14:31:10 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-11-24 09:45:29 +0100
commit9137bd2dd3ab66ffa783fc15a1add1e9cf541460 (patch)
treeecf5819c8beef005774e8b6daa9a8d80ef0b35d1 /vcl/unx
parentc8b21dd6a310ff4fb1dd53c6930768fda34dda4b (diff)
enable using medium/full font hinting even with subpixel positioning
Change-Id: I1be0670d59163070dccf035ec9c7b0cd4f818c69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159766 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 9b998066954b..7e7ce9ca700f 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -418,12 +418,13 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
const bool bDisableAA = !rStyleSettings.GetUseFontAAFromSystem() && !rGraphics.getAntiAlias();
+ static bool bAllowDefaultHinting = getenv("SAL_ALLOW_DEFAULT_HINTING") != nullptr;
const cairo_font_options_t* pFontOptions = GetSalInstance()->GetCairoFontOptions();
if (pFontOptions || bDisableAA || bSubpixelPositioning)
{
cairo_hint_style_t eHintStyle = pFontOptions ? cairo_font_options_get_hint_style(pFontOptions) : CAIRO_HINT_STYLE_DEFAULT;
- bool bAllowedHintStyle = !bSubpixelPositioning || (eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT);
+ bool bAllowedHintStyle = !bSubpixelPositioning || bAllowDefaultHinting || (eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT);
if (bDisableAA || !bAllowedHintStyle || bSubpixelPositioning)
{