diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-17 17:16:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-18 20:31:10 +0200 |
commit | f85cd07295321cf875addeb52aa9e982808b74ae (patch) | |
tree | b4d918c99648ee2415486ef506a6a170e916e7bf /drawinglayer | |
parent | 1fa731d03ba0f22cb9392a578124ea977eaab2e9 (diff) |
tdf#150462 set mode to keep scaled glyph positions as floating point
and match render settings to best support that
Change-Id: I623f9e578ee6c3fe54a966342b3cdd16b31f219a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138450
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/vclpixelprocessor2d.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index 5e0612f94a93..fe2f30cbf23a 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -75,9 +75,12 @@ namespace drawinglayer::processor2d struct VclPixelProcessor2D::Impl { AntialiasingFlags m_nOrigAntiAliasing; + bool m_bOrigTextRenderModeForResolutionIndependentLayout; explicit Impl(OutputDevice const& rOutDev) : m_nOrigAntiAliasing(rOutDev.GetAntialiasing()) + , m_bOrigTextRenderModeForResolutionIndependentLayout( + rOutDev.GetTextRenderModeForResolutionIndependentLayout()) { } }; @@ -104,6 +107,9 @@ VclPixelProcessor2D::VclPixelProcessor2D(const geometry::ViewInformation2D& rVie { mpOutputDevice->SetAntialiasing(m_pImpl->m_nOrigAntiAliasing & ~AntialiasingFlags::Enable); } + + // tdf#150462 set text render mode to suit use of resolution independent text layout + mpOutputDevice->SetTextRenderModeForResolutionIndependentLayout(true); } VclPixelProcessor2D::~VclPixelProcessor2D() @@ -113,6 +119,9 @@ VclPixelProcessor2D::~VclPixelProcessor2D() // restore AntiAliasing mpOutputDevice->SetAntialiasing(m_pImpl->m_nOrigAntiAliasing); + + mpOutputDevice->SetTextRenderModeForResolutionIndependentLayout( + m_pImpl->m_bOrigTextRenderModeForResolutionIndependentLayout); } void VclPixelProcessor2D::tryDrawPolyPolygonColorPrimitive2DDirect( |