[Libreoffice-commits] core.git: Branch 'private/tml/fixwintext' - vcl/win
Tim Eves
tim_eves at sil.org
Mon Mar 14 10:31:08 UTC 2016
vcl/win/gdi/winlayout.cxx | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
New commits:
commit af6205c30ea899da4a489f8be47bc3c4c0225ba5
Author: Tim Eves <tim_eves at sil.org>
Date: Mon Mar 14 17:04:29 2016 +0700
Make AddChunkOfGlyphs() bail when CJK text is requested
Change-Id: I4374c809014ac618d5b701752e6bb6b9a196fe8d
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index a5d810c..9cd70d0 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -425,6 +425,22 @@ bool WinFontInstance::AddChunkOfGlyphs(bool bRealGlyphIndices, int nGlyphIndex,
pTxt->BindFont(hDC);
+ // Bail for vertical 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] == '@')
+ {
+ pTxt->ReleaseFont();
+ return false;
+ }
+ }
// Fetch the ink boxes and calculate the size of the atlas.
if (!bRealGlyphIndices)
{
More information about the Libreoffice-commits
mailing list