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.

Change-Id: I44d035ab0890614be393599a5492e42e09231d86
Reviewed-on: https://gerrit.libreoffice.org/70945
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 797ce2e..b3fe013 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -458,12 +458,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