summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2016-03-16 16:51:09 +0200
committerTor Lillqvist <tml@collabora.com>2016-03-16 19:31:33 +0200
commite3d0e8069e3bd82831b0070f70052f2202180192 (patch)
tree5ad7168c10b043655586e1d7d16e17aa66a6033a
parent652e8a2b37bded8afe73f8ee03bb6664443c7cab (diff)
tdf#97319: Give up on caching non-BMP glyphs
I can't figure out why successive non-BMP glyphs in the bugdoc get drawn on top of each others. So bail out... Change-Id: I9c6241916347ec31d616e5cbf00bf3b1869edba2
-rw-r--r--vcl/win/gdi/winlayout.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx
index fa16339ba3d9..f4f8d94ac08d 100644
--- a/vcl/win/gdi/winlayout.cxx
+++ b/vcl/win/gdi/winlayout.cxx
@@ -730,7 +730,10 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
if( bSurrogate )
nCharCode = 0x10000 + ((pCodes[0] - 0xD800) << 10) + (pCodes[1] - 0xDC00);
else // or fall back to a replacement character
+ {
+ // FIXME: Surely this is an error situation that should not happen?
nCharCode = '?';
+ }
}
// get the advance width for the current UTF-32 code point
@@ -1513,8 +1516,12 @@ bool SimpleWinLayout::CacheGlyphs(SalGraphics& rGraphics) const
int nCodePoint;
if (i < mnGlyphCount-1 && rtl::isHighSurrogate(mpOutGlyphs[i]) && rtl::isLowSurrogate(mpOutGlyphs[i+1]))
{
+#if 1
+ return false;
+#else
nCodePoint = rtl::combineSurrogates(mpOutGlyphs[i], mpOutGlyphs[i+1]);
i++;
+#endif
}
else
{