Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-92358

One More Crash in text shaping on special string with EmojiOneColor font.

    XMLWordPrintable

Details

    • Linux/X11, Windows
    • 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)

    Description

      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).

      Attachments

        For Gerrit Dashboard: QTBUG-92358
        # Subject Branch Project Status CR V

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            johnpreston John Preston
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes