diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-07-17 12:27:03 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-07-23 06:01:38 +0200 |
commit | dd4a3fe191aab884380784250144c9fdd9647be3 (patch) | |
tree | f9d371ca07c668257696529b0d1bfb5d189d048b /vcl/unx | |
parent | c46f8c356d812230c3a43cd08fb79674be88d9a8 (diff) |
vcl: TextRenderModeForResolutionIndependentLayout → SubpixelPositioning
Change-Id: I8698d0f74889ac8a7de64a97e8cf0e8878ef7fc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154517
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 8390e47680be..ef3f05fd7416 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -241,7 +241,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG { const LogicalFontInstance& rInstance = rLayout.GetFont(); - const bool bResolutionIndependentLayoutEnabled = rLayout.GetTextRenderModeForResolutionIndependentLayout(); + const bool bSubpixelPositioning = rLayout.GetSubpixelPositioning(); /* * It might be ideal to cache surface and cairo context between calls and @@ -279,7 +279,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG const bool bVertical = pGlyph->IsVertical(); glyph_extrarotation.push_back(bVertical ? 1 : 0); - if (bResolutionIndependentLayoutEnabled) + if (bSubpixelPositioning) { // tdf#150507 like skia, even when subpixel rendering pixel, snap y if (!bVertical) @@ -419,12 +419,12 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG const bool bDisableAA = !rStyleSettings.GetUseFontAAFromSystem() && !rGraphics.getAntiAlias(); const cairo_font_options_t* pFontOptions = GetSalInstance()->GetCairoFontOptions(); - if (pFontOptions || bDisableAA || bResolutionIndependentLayoutEnabled) + if (pFontOptions || bDisableAA || bSubpixelPositioning) { cairo_hint_style_t eHintStyle = pFontOptions ? cairo_font_options_get_hint_style(pFontOptions) : CAIRO_HINT_STYLE_DEFAULT; - bool bAllowedHintStyle = !bResolutionIndependentLayoutEnabled || (eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT); + bool bAllowedHintStyle = !bSubpixelPositioning || (eHintStyle == CAIRO_HINT_STYLE_NONE || eHintStyle == CAIRO_HINT_STYLE_SLIGHT); - if (bDisableAA || !bAllowedHintStyle || bResolutionIndependentLayoutEnabled) + if (bDisableAA || !bAllowedHintStyle || bSubpixelPositioning) { // Disable font AA in case global AA setting is supposed to affect // font rendering (not the default) and AA is disabled. @@ -436,7 +436,7 @@ void CairoTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalG cairo_font_options_set_hint_style(pOptions, CAIRO_HINT_STYLE_SLIGHT); // Disable private CAIRO_ROUND_GLYPH_POS_ON by merging with font options known to have // CAIRO_ROUND_GLYPH_POS_OFF - if (bResolutionIndependentLayoutEnabled) + if (bSubpixelPositioning) { cairo_font_options_merge(pOptions, CairoFontOptions::get()); // tdf#153699 skip this with cairo 1.17.8 as it has a problem |