[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/win

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 29 09:47:38 UTC 2019


 vcl/win/gdi/winlayout.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b97495c5ea1bb6dd6504609d4951ce70b3d5be89
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Apr 18 18:03:36 2019 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Apr 29 11:46:58 2019 +0200

    tdf#113076 vcl windows opengl: specific italic set font was clipped on ...
    
    ... right edge in presentation mode.
    
    This seems to be a problem since commit
    a51b7a1c3a7e7cf7b0c733e1dec40288278c1884 (tdf#103831, tdf#100986: Force
    using GDI when needed, 2017-03-03), which blacklisted DirectWrite in the
    OpenGL case for both vertical text and horizontally stretched text.
    
    I tested that the overlapping characters problem from tdf#103831 is not
    re-introduced, and switching to DW (in the horizontal stretching &&
    OpenGL case) fixes the unwanted clipping of glyphs for the tdf#113076
    bugdoc.
    
    This also simplifies the situation, since the general rule since commit
    d436065bc1c68fc2d90e73253d8c00503c72dfd0 (tdf#103725: Default to GDI
    even with the new layout engine, 2016-11-15) is that non-OpenGL defaults
    to GDI rendering and OpenGL defaults to DirectWrite rendering.
    
    (cherry picked from commit 4657335fa5bcbe7980f229ca41ddd82d93c355eb)
    
    Change-Id: I44d035ab0890614be393599a5492e42e09231d86
    Reviewed-on: https://gerrit.libreoffice.org/71288
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>

diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 91e82e8ba40e..3aa8133be598 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -465,12 +465,12 @@ void WinSalGraphics::DrawTextLayout(const GenericSalLayout& rLayout)
 
     const WinFontInstance* pWinFont = static_cast<const WinFontInstance*>(&rLayout.GetFont());
     const HFONT hLayoutFont = pWinFont->GetHFONT();
+    bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter;
 
     // Our DirectWrite renderer is incomplete, skip it for non-horizontal or
     // stretched text.
-    bool bForceGDI = rLayout.GetOrientation() || pWinFont->hasHScale();
+    bool bForceGDI = rLayout.GetOrientation() || (pWinFont->hasHScale() && !bUseOpenGL);
 
-    bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled() && !mbPrinter;
     if (!bUseOpenGL)
     {
         // no OpenGL, just classic rendering


More information about the Libreoffice-commits mailing list