summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-03-06 16:52:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-03-07 12:18:51 +0000
commit596c7331e07038e229bad9e817f835fb9107f11d (patch)
tree1948b68d3e3b71206201e2ceb3772362c98a4186 /vcl
parent8fd61209c9aede44b30f74d8d630236f79504a5e (diff)
tdf#153699 workaround cairo 1.17.8 problem
Change-Id: I5290dd93d06a6812acf97fe0eeec581a233a898c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148317 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-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 7bd74f0a4830..612bf49ff6d0 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -294,7 +294,10 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG
if (bResolutionIndependentLayoutEnabled)
{
cairo_font_options_merge(pOptions, mpRoundGlyphPosOffOptions);
- cairo_font_options_set_hint_metrics(pOptions, CAIRO_HINT_METRICS_OFF);
+ // tdf#153699 skip this with cairo 1.17.8 as it has a problem
+ // See: https://gitlab.freedesktop.org/cairo/cairo/-/issues/643
+ if (cairo_version() != CAIRO_VERSION_ENCODE(1,17,8))
+ cairo_font_options_set_hint_metrics(pOptions, CAIRO_HINT_METRICS_OFF);
}
cairo_set_font_options(cr, pOptions);
cairo_font_options_destroy(pOptions);