diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-07-26 13:20:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-07-26 21:05:41 +0200 |
commit | 59cfcd863b483a99491e6f8cd30016386bbff870 (patch) | |
tree | b995dc9d1960b84e59a13ab2cd74f5dbd05d4782 | |
parent | 1c31791b0635dd626ce05a697c648ded0d6fea87 (diff) |
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 <caolanm@redhat.com>
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
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); } |