vcl/unx/generic/gdi/cairotextrender.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 6231b4b2a8bcfdcb80c5b4555f6a9d2c9946b9c6 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 15:32:29 2023 +0000 tdf#153699 workaround cairo 1.17.8 problem Change-Id: I5290dd93d06a6812acf97fe0eeec581a233a898c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148356 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 53063a1bfcb1..93020e8f0884 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -301,7 +301,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);