vcl/unx/generic/gdi/cairotextrender.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 596c7331e07038e229bad9e817f835fb9107f11d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Mar 6 16:52:55 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Mar 7 12:18:51 2023 +0000

    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.st...@allotropia.de>
    Tested-by: Jenkins

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);

Reply via email to