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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Platform/s:
      Linux/X11, Windows

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes