diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-23 00:17:49 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-04-23 00:22:39 +1000 |
commit | efbc6ba6af3db201e610abb93ceab61818b98d28 (patch) | |
tree | 2f02e5d71020bc5142390c2fe00eb645ef71beca | |
parent | f515609c725b754d687c0f98ef61e9b6c9ac9a4a (diff) |
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
-rw-r--r-- | vcl/source/gdi/print.cxx | 8 | ||||
-rw-r--r-- | vcl/source/outdev/font.cxx | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 56597099629c..b3daa804a7e6 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 225dac3a2811..ceea7a9d58c4 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; |