diff --git a/src/corelib/tools/qunicodetools.cpp b/src/corelib/tools/qunicodetools.cpp index fc36d07..bb2c032 100644 --- a/src/corelib/tools/qunicodetools.cpp +++ b/src/corelib/tools/qunicodetools.cpp @@ -710,6 +710,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) script = QChar::Script(prop->script); } +#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change. if (Q_LIKELY(script != QChar::Script_Common)) { // override preceding Common-s while (sor > 0 && scripts[sor - 1] == QChar::Script_Common) @@ -719,6 +720,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) if (sor > 0) script = scripts[sor - 1]; } +#endif while (sor < eor) scripts[sor++] = script; @@ -726,6 +728,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) script = prop->script; } eor = length; + +#if 0 // ### Disabled due to regressions. The font selection algorithm is not prepared for this change. if (Q_LIKELY(script != QChar::Script_Common)) { // override preceding Common-s while (sor > 0 && scripts[sor - 1] == QChar::Script_Common) @@ -735,6 +739,8 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) if (sor > 0) script = scripts[sor - 1]; } +#endif + while (sor < eor) scripts[sor++] = script; } diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index a305900..fcf1a14 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -124,7 +124,7 @@ private: for (int i = start + 1; i < end; ++i) { if (m_analysis[i].bidiLevel == m_analysis[start].bidiLevel && m_analysis[i].flags == m_analysis[start].flags - && m_analysis[i].script == m_analysis[start].script + && (m_analysis[i].script == m_analysis[start].script || m_string[i] == QLatin1Char('.')) && m_analysis[i].flags < QScriptAnalysis::SpaceTabOrObject && i - start < MaxItemLength) continue;