[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win
Michael Meeks
michael.meeks at collabora.com
Thu Mar 3 17:04:41 UTC 2016
vcl/win/source/gdi/salgdi3.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 9c473d38885e74b5a48ccd54b1f3e30b01a710d2
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Thu Mar 3 11:37:41 2016 +0000
tdf#98380 - opengl - get font anti-aliasing right.
Change-Id: I087c4939c19bc5966da45cb848d71e95ac982e33
Reviewed-on: https://gerrit.libreoffice.org/22855
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: László Németh <nemeth at numbertext.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 4de6530..dfeb0e0 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -40,6 +40,7 @@
#include <vcl/settings.hxx>
#include <vcl/sysdata.hxx>
#include <vcl/metric.hxx>
+#include <vcl/opengl/OpenGLWrapper.hxx>
#include "fontsubset.hxx"
#include "outdev.h"
@@ -1393,6 +1394,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;
@@ -1402,7 +1412,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