diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index 1d472b5ceb..a1d5b40094 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -282,7 +282,8 @@ bool GuiFontMetrics::breakAt(docstring & s, int & x, bool const rtl, bool const tl.setText(qs); tl.setFont(font_); QTextOption to; - to.setWrapMode(force ? QTextOption::WrapAnywhere : QTextOption::WordWrap); + to.setWrapMode(force ? QTextOption::WrapAtWordBoundaryOrAnywhere + : QTextOption::WordWrap); tl.setTextOption(to); tl.beginLayout(); QTextLine line = tl.createLine(); diff --git a/status.22x b/status.22x index b9aed110db..492f08b8bf 100644 --- a/status.22x +++ b/status.22x @@ -133,6 +133,9 @@ What's new - Fix bad painting of collapsable insets sub-label when selecting (bug 10475). +- Always prefer breaking lines at word boundaries even for very long words. This + fixes line breaking issues most noticeably in languages where spaces are rare + such as Chinese (bug 10299). * INTERNALS