Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.7.0
-
None
-
4cff91c66207b870e12365421e63cd978e162e64
Description
Qt enters an endless loop when Align Justify is used (some parts of the text are Bold Italic)
Loop is executed in: qtextengine.cpp in line1952:
// distribute in priority order
if (maxJustify >= HB_Arabic_Normal) {
while (need >= minKashida) {
for (int type = maxJustify; need >= minKashida && type >= HB_Arabic_Normal; --type) {
for (int i = 0; need >= minKashida && i < nPoints; ++i) {
if (justificationPoints[i].type == type && justificationPoints[i].kashidaWidth <= need) {
justificationPoints[i].glyph.justifications->nKashidas++;
// ############
justificationPoints[i].glyph.justifications->space_18d6 += justificationPoints[i].kashidaWidth.value();
need -= justificationPoints[i].kashidaWidth;
// qDebug("adding kashida type %d with width %x, neednow %x", type, justificationPoints[i].kashidaWidth, need.value());
}
This has been reproduced on Windows. Follow these steps to reproduce the problem:
1) Run the QTextEdit demo.
2) Remove its content and set its font to Arial 12.
3) Select the keyboard input method Arabic Morocco from the language bar
4) Type some Arabic text.
5) Select some of the text, spanning two lines. Do not select all text.
6) Hit the Italic button
7) Hit the Justify button and the application will hang.
Attachments
Issue Links
- resulted in
-
QTBUG-13132 Arial, Times New Roman and Courier fonts cannot display Italic font: empty squares are displayed instead. MSWord displays everything correct.
-
- Closed
-