vcl/unx/generic/gdi/cairotextrender.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit cc6a55a855c20343e87d85c833781a7d32af8b8d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jul 26 13:20:19 2022 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Jul 27 10:53:22 2022 +0200 tdf#150145 text appears to have a row of pixels cropped out which is very similar sounding to https://gitlab.freedesktop.org/cairo/cairo/-/issues/390 seems to be a bad interaction of slight hinting and sub pixel positioning with hints_metrics disabled with CAIRO_HINT_METRICS_OFF. lets continue to assume we desire CAIRO_HINT_METRICS_OFF most and disable hinting rather than use slight (cherry picked from commit 59cfcd863b483a99491e6f8cd30016386bbff870) Change-Id: Id7b35d0e4f9291987e8ab96814936700374c6e16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137491 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index c403c2f3246b..2d8dfbb8c1c0 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -177,7 +177,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG const bool bResolutionIndependentLayoutEnabled = rGraphics.getTextRenderModeForResolutionIndependentLayoutEnabled(); cairo_hint_style_t eHintStyle = cairo_font_options_get_hint_style(pFontOptions); cairo_hint_metrics_t eHintMetricsStyle = cairo_font_options_get_hint_metrics(pFontOptions); - bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || (eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT); + bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || (eHintStyle == CAIRO_HINT_STYLE_NONE); bool bAllowedHintMetricStyle = !bResolutionIndependentLayoutEnabled || (eHintMetricsStyle == CAIRO_HINT_METRICS_OFF); if (bDisableAA || !bAllowedHintStyle || !bAllowedHintMetricStyle) @@ -187,10 +187,10 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG cairo_font_options_t* pOptions = cairo_font_options_copy(pFontOptions); if (bDisableAA) cairo_font_options_set_antialias(pOptions, CAIRO_ANTIALIAS_NONE); - if (!bAllowedHintStyle) - cairo_font_options_set_hint_style(pOptions, CAIRO_HINT_STYLE_SLIGHT); if (!bAllowedHintMetricStyle) cairo_font_options_set_hint_metrics(pOptions, CAIRO_HINT_METRICS_OFF); + if (!bAllowedHintStyle) + cairo_font_options_set_hint_style(pOptions, CAIRO_HINT_STYLE_NONE); cairo_set_font_options(cr, pOptions); cairo_font_options_destroy(pOptions); }