sd/qa/unit/PNGExportTests.cxx      |    4 ++--
 vcl/win/gdi/DWriteTextRenderer.cxx |    3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 785a56b6be7f3128c2e7a131381e02525a50eb6b
Author:     Mike Kaganski <[email protected]>
AuthorDate: Wed Nov 27 14:48:19 2024 +0500
Commit:     Mike Kaganski <[email protected]>
CommitDate: Wed Nov 27 13:49:43 2024 +0100

    D2DWriteTextOutRenderer: use grayscale AA for file output
    
    It makes no sense to use ClearType for file output - because it, by
    definition, depends on the device and scale; and the file output is
    for display on unknown device and scale.
    
    Change-Id: Icf032b1fecc1a4a7f0a4be53797728c9f9505fdb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177402
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index 96d2f69c8569..0dfaef1eb2cc 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -1056,8 +1056,8 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf162259)
         }
     }
 
-    CPPUNIT_ASSERT_GREATER(350, topNonWhites); // 399 in my testing
-    CPPUNIT_ASSERT_GREATER(350, bottomNonWhites); // 362 in my testing
+    CPPUNIT_ASSERT_GREATER(310, topNonWhites); // Win: 399 with Skia, 325 with 
DWriteTextRenderer
+    CPPUNIT_ASSERT_GREATER(350, bottomNonWhites); // Win: 362 with Skia, 371 
with DWriteTextRenderer
 }
 #endif
 
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx 
b/vcl/win/gdi/DWriteTextRenderer.cxx
index 8a3ade545e36..06f927b725a6 100644
--- a/vcl/win/gdi/DWriteTextRenderer.cxx
+++ b/vcl/win/gdi/DWriteTextRenderer.cxx
@@ -101,7 +101,8 @@ D2DWriteTextOutRenderer::MODE 
D2DWriteTextOutRenderer::GetMode(bool bRenderingMo
 {
     D2D1_TEXT_ANTIALIAS_MODE eTextMode;
     if 
(!Application::GetSettings().GetStyleSettings().GetUseFontAAFromSystem())
-        eTextMode = bAntiAlias ? lclGetSystemTextAntiAliasType() : 
D2D1_TEXT_ANTIALIAS_MODE_ALIASED;
+        // Currently only for file output - see GraphicExporter::filter
+        eTextMode = bAntiAlias ? D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE : 
D2D1_TEXT_ANTIALIAS_MODE_ALIASED;
     else if (BOOL bSmoothing; SystemParametersInfoW(SPI_GETFONTSMOOTHING, 0, 
&bSmoothing, 0))
         eTextMode = bSmoothing ? lclGetSystemTextAntiAliasType() : 
D2D1_TEXT_ANTIALIAS_MODE_ALIASED;
     else

Reply via email to