[Libreoffice-commits] core.git: vcl/win
Michael Meeks
michael.meeks at collabora.com
Thu Mar 3 12:54:31 UTC 2016
vcl/win/gdi/salfont.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit a419ef186038e92f27ac5e201e231578867a66e9
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Mar 3 11:31:03 2016 +0000
tdf#98380 - opengl - get font anti-aliasing right.
Change-Id: I087c4939c19bc5966da45cb848d71e95ac982e33
Reviewed-on: https://gerrit.libreoffice.org/22854
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 7cfff0e..a47f3d1 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;
More information about the Libreoffice-commits
mailing list