diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-03-03 11:37:41 +0000 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-03-03 17:04:19 +0000 |
commit | 9c473d38885e74b5a48ccd54b1f3e30b01a710d2 (patch) | |
tree | 559d693e1f90cbe64ef99192ce236e42450ddcae /vcl | |
parent | ff202419fc61081d8dff17fbf8a543fc0f47bf48 (diff) |
tdf#98380 - opengl - get font anti-aliasing right.
Change-Id: I087c4939c19bc5966da45cb848d71e95ac982e33
Reviewed-on: https://gerrit.libreoffice.org/22855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salgdi3.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index 4de653025bf6..dfeb0e09df0c 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; |