Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.4.0
-
None
-
Arch Linux
-
bd3c82f8db4391fc1d6d3338827356143fd598dd (qt/qtbase/5.14)
Description
It seems the width of the soft hyphen is not considered in the line width calculation, making it protrude from the rest of the text:
Test Case
#include <QApplication> #include <QTextDocument> #include <QTextEdit> #include <QString> int main(int argc, char *argv[]) { QApplication app(argc, argv); QTextEdit edit("Soft hyphen pro" + QString(QChar::SoftHyphen) + "trudes from rest of text"); edit.document()->setDocumentMargin(20); edit.setAlignment(Qt::AlignJustify); edit.resize(150, 100); edit.show(); return app.exec(); }
Result
Note: Until issue 44234 is fixed, you must run the above with QT_HARFBUZZ=old in the environment for the soft hyphen to appear at all on 5.x.
Attachments
Issue Links
- depends on
-
QTBUG-44234 [REG 5.3->5.4] Soft-hyphen not visible at end of line
-
- Closed
-