summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-04-18 18:03:36 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-04-23 10:26:16 +0200
commit4657335fa5bcbe7980f229ca41ddd82d93c355eb (patch)
tree716488785c464ba4c887263f04d0b3f781a179c2
parent943a534ac7cb3df513583e226c986dafd8ba246b (diff)
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>
-rw-r--r--vcl/win/gdi/winlayout.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index 797ce2eb8ffc..b3fe0132b7df 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