[Libreoffice-commits] core.git: vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Tue Apr 22 07:29:51 PDT 2014


 vcl/source/gdi/print.cxx   |    8 --------
 vcl/source/outdev/font.cxx |    7 +++++++
 2 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit efbc6ba6af3db201e610abb93ceab61818b98d28
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Wed Apr 23 00:17:49 2014 +1000

    Fix regression introduced in f4e8bca336 when fixing fdo#74702
    
    I misread the original code and in OutputDevice::InitFont().
    Antialiasing should NOT be done for Printer fonts, and SHOULD be done
    by VirtualDevice and Window fonts. Unfortunately, I made Printer fonts
    do anti-aliasing and VirtualDevice and Window fonts did not...
    
    Change-Id: Ic38451da4ffdfa2e7a5412355f659bde03eae08f

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 5659709..b3daa80 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -33,7 +33,6 @@
 #include <vcl/gdimtf.hxx>
 #include <vcl/metaact.hxx>
 #include <vcl/print.hxx>
-#include <vcl/settings.hxx>
 
 #include <salinst.hxx>
 #include <salvd.hxx>
@@ -1822,13 +1821,6 @@ void Printer::InitFont() const
 
     if ( mbInitFont )
     {
-        // decide if antialiasing is appropriate
-        bool bNonAntialiased = (GetAntialiasing() & ANTIALIASING_DISABLE_TEXT) != 0;
-        const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
-        bNonAntialiased |= ((rStyleSettings.GetDisplayOptions() & DISPLAY_OPTION_AA_DISABLE) != 0);
-        bNonAntialiased |= (int(rStyleSettings.GetAntialiasingMinPixelHeight()) > mpFontEntry->maFontSelData.mnHeight);
-        mpFontEntry->maFontSelData.mbNonAntialiased = bNonAntialiased;
-
         // select font in the device layers
         mpFontEntry->mnSetFontFlags = mpGraphics->SetFont( &(mpFontEntry->maFontSelData), 0 );
         mbInitFont = false;
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 225dac3..ceea7a9 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -1162,6 +1162,13 @@ void OutputDevice::InitFont() const
 
     if ( mbInitFont )
     {
+        // decide if antialiasing is appropriate
+        bool bNonAntialiased = (GetAntialiasing() & ANTIALIASING_DISABLE_TEXT) != 0;
+        const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+        bNonAntialiased |= ((rStyleSettings.GetDisplayOptions() & DISPLAY_OPTION_AA_DISABLE) != 0);
+        bNonAntialiased |= (int(rStyleSettings.GetAntialiasingMinPixelHeight()) > mpFontEntry->maFontSelData.mnHeight);
+        mpFontEntry->maFontSelData.mbNonAntialiased = bNonAntialiased;
+
         // select font in the device layers
         mpFontEntry->mnSetFontFlags = mpGraphics->SetFont( &(mpFontEntry->maFontSelData), 0 );
         mbInitFont = false;


More information about the Libreoffice-commits mailing list