Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.4.1
-
None
-
c29c6d9003b3ff67770dee66652dd2faecf842d5
Description
Run the following application (reproduced on Mac OS X):
#include <QtWidgets> int main(int argc, char *argv[]) { QApplication a(argc, argv); QTextEdit w; w.setText("fifi"); QTextCursor cursor(w.document()); cursor.movePosition(QTextCursor::EndOfLine); QTextCharFormat fmt; fmt.setFontUnderline(true); cursor.setCharFormat(fmt); cursor.insertText(QStringLiteral("\u305F\u305F\u305F")); w.show(); return a.exec(); }
Two of the Hiragana characters will be boxes while the third will be rendered correctly.
Remove the setCharFormat() call to see it work correctly.
The more ligatures you add to the beginning of the string, the more of the appended Hiragana characters will show as boxes.
What happens is that the glyph array contains the glyph indexes for the "f" and the "i", but the glyph data offset of the first Hiragana symbol points to the third glyph in the array, since both "fi" ligatures have been substituted by a single glyph each. This in turn means that Qt detects that the Hiragana character already has a glyph and thus does not search for the correct font engine to render it.
I haven't been able to reproduce this on Linux though, so there has to be something different there.
Attachments
Issue Links
- is duplicated by
-
QTBUG-49860 Qt applications crash when special characters are written into QML text boxes
- Closed