diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-03-03 11:31:03 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-03-03 12:54:10 +0000 |
commit | a419ef186038e92f27ac5e201e231578867a66e9 (patch) | |
tree | ef2e4ebbf6800b56872ac8ffe22c8be7a916f705 | |
parent | e4fe540aa4f77a4d76e4c6042d5790211aebc450 (diff) |
tdf#98380 - opengl - get font anti-aliasing right.
Change-Id: I087c4939c19bc5966da45cb848d71e95ac982e33
Reviewed-on: https://gerrit.libreoffice.org/22854
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 7cfff0e8fbc3..a47f3d1bd0da 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -41,6 +41,7 @@ #include <vcl/sysdata.hxx> #include <vcl/metric.hxx> #include <vcl/fontcharmap.hxx> +#include <vcl/opengl/OpenGLWrapper.hxx> #include "fontsubset.hxx" #include "outdev.h" @@ -1303,6 +1304,15 @@ void ImplGetLogFontFromFontSelect( HDC hDC, rLogFont.lfPitchAndFamily = pWinFontData->GetPitchAndFamily(); } + static BYTE nDefaultQuality = NONANTIALIASED_QUALITY; + if (nDefaultQuality == NONANTIALIASED_QUALITY) + { + if (OpenGLWrapper::isVCLOpenGLEnabled()) + nDefaultQuality = ANTIALIASED_QUALITY; + else + nDefaultQuality = DEFAULT_QUALITY; + } + rLogFont.lfWeight = ImplWeightToWin( pFont->GetWeight() ); rLogFont.lfHeight = (LONG)-pFont->mnHeight; rLogFont.lfWidth = (LONG)pFont->mnWidth; @@ -1312,7 +1322,7 @@ void ImplGetLogFontFromFontSelect( HDC hDC, rLogFont.lfEscapement = pFont->mnOrientation; rLogFont.lfOrientation = rLogFont.lfEscapement; rLogFont.lfClipPrecision = CLIP_DEFAULT_PRECIS; - rLogFont.lfQuality = DEFAULT_QUALITY; + rLogFont.lfQuality = nDefaultQuality; rLogFont.lfOutPrecision = OUT_TT_PRECIS; if ( pFont->mnOrientation ) rLogFont.lfClipPrecision |= CLIP_LH_ANGLES; |