vcl/unx/generic/gdi/cairotextrender.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit 59cfcd863b483a99491e6f8cd30016386bbff870 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jul 26 13:20:19 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jul 26 21:05:41 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 Change-Id: Id7b35d0e4f9291987e8ab96814936700374c6e16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137466 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 0be33e9436c9..7300562d5d68 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -199,7 +199,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) @@ -209,10 +209,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); }