diff options
Diffstat (limited to 'src/gui/text/qtextengine_mac.cpp')
-rw-r--r-- | src/gui/text/qtextengine_mac.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/text/qtextengine_mac.cpp b/src/gui/text/qtextengine_mac.cpp index 251d9b5..9da8f03 100644 --- a/src/gui/text/qtextengine_mac.cpp +++ b/src/gui/text/qtextengine_mac.cpp @@ -605,6 +605,12 @@ void QTextEngine::shapeTextMac(int item) const unsigned short *log_clusters = logClusters(&si); bool stringToCMapFailed = false; + // Skip shaping of line or paragraph separators since we are not + // going to draw them anyway + if (si.analysis.flags == QScriptAnalysis::LineOrParagraphSeparator + && !(option.flags() & QTextOption::ShowLineAndParagraphSeparators)) + goto cleanUp; + if (!fe->stringToCMap(str, len, &g, &num_glyphs, flags, log_clusters, attributes(), &si)) { ensureSpace(num_glyphs); g = availableGlyphs(&si); @@ -645,6 +651,7 @@ void QTextEngine::shapeTextMac(int item) const } } +cleanUp: const ushort *uc = reinterpret_cast<const ushort *>(str); if ((si.analysis.flags == QScriptAnalysis::SmallCaps || si.analysis.flags == QScriptAnalysis::Uppercase |