From e3d0e8069e3bd82831b0070f70052f2202180192 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 16 Mar 2016 16:51:09 +0200 Subject: 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 --- vcl/win/gdi/winlayout.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vcl') 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 { -- cgit v1.2.3