-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.2
-
None
-
-
413cd06c88 (qt/qtbase/dev) 413cd06c88 (qt/tqtc-qtbase/dev) 30cefa1c79 (qt/qtbase/6.3) 30cefa1c79 (qt/tqtc-qtbase/6.3) 9540c0b27f (qt/qtbase/6.2) 9540c0b27f (qt/tqtc-qtbase/6.2) 5a86aa3b17 (qt/tqtc-qtbase/5.15)
This is a continuation of QTBUG-89155
I've backported the fix from the mentioned issue and the code stopped crashing there, but if we modify the code to this:
QFontDatabase::addApplicationFont("EmojiOneColor-SVGinOT.ttf"); auto image = QImage(256, 256, QImage::Format_ARGB32_Premultiplied); const auto string = QString() + QChar(8205) + QChar(9794) + QChar(65039); auto p = QPainter(&image); p.setFont(QFont("Emoji One Color")); p.drawText(QRect(0, 0, 20, 20), string);
With "EmojiOneColor-SVGinOT.ttf" file being in the app folder (so it could load the font) crashes in text layout (we replaced "drawText(0, 0" to "drawText(QRect(0, 0, 20, 20)" to force text layout).
| For Gerrit Dashboard: QTBUG-92358 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 389733,6 | Fix crash when text shaping fails | dev | qt/qtbase | Status: MERGED | +2 | 0 |
| 390159,2 | Fix crash when text shaping fails | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |
| 390160,2 | Fix crash when text shaping fails | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
| 390167,2 | Fix crash when text shaping fails | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |