vcl/win/gdi/salfont.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit a419ef186038e92f27ac5e201e231578867a66e9
Author: Michael Meeks <michael.me...@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 <c...@libreoffice.org>
    Reviewed-by: Michael Meeks <michael.me...@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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to