[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/win
Tor Lillqvist
tml at collabora.com
Fri May 13 07:19:12 UTC 2016
vcl/win/source/gdi/winlayout.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit dd8319479fe3863324c27407625fe5e6ba759f17
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu May 12 14:22:42 2016 +0300
tdf#99369: Try harder to bail out for non-horizontal text
Look not only for fonts with rotated glyphs (where the first character
of the face name is '@') but also for font objects with non-zero
orientation or escapement in general.
(cherry-picked from the commit 43c95611d2621d1f2f9d60b26c07aad25c62baed)
Change-Id: Ia88d38010e52ada8193f2b8057d9f3250108e9f1
Reviewed-on: https://gerrit.libreoffice.org/24929
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 360a3d3..4dc79ea 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -370,17 +370,21 @@ bool ImplWinFontEntry::CacheGlyphToAtlas(bool bRealGlyphIndices, int nGlyphIndex
pTxt->BindFont(hDC);
- // Bail for vertical text.
+ // Bail for non-horizontal text.
{
wchar_t sFaceName[200];
int nFaceNameLen = GetTextFaceW(hDC, SAL_N_ELEMENTS(sFaceName), sFaceName);
- SelectObject(hDC, hOrigFont);
- DeleteDC(hDC);
if (!nFaceNameLen)
SAL_WARN("vcl.gdi", "GetTextFace failed: " << WindowsErrorString(GetLastError()));
- if (sFaceName[0] == '@')
+ LOGFONTW aLogFont;
+ GetObjectW(rLayout.mhFont, sizeof(LOGFONTW), &aLogFont);
+
+ SelectObject(hDC, hOrigFont);
+ DeleteDC(hDC);
+
+ if (sFaceName[0] == '@' || aLogFont.lfOrientation != 0 || aLogFont.lfEscapement != 0)
{
pTxt->ReleaseFont();
return false;
More information about the Libreoffice-commits
mailing list