drawinglayer/source/processor2d/vclpixelprocessor2d.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit f85cd07295321cf875addeb52aa9e982808b74ae
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Aug 17 17:16:16 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Aug 18 20:31:10 2022 +0200

    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 <caol...@redhat.com>

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(

Reply via email to