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

FreeType engine glyphs cache bug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0
    • GUI: Text handling
    • None
    • All

    Description

      Hello there! I render text, specifically color bitmaps from font, using Qt FreeType engine. Bug that I will describe affect any component of Qt that can render text: QTextEdit, QPainter. I'm using font: https://github.com/googlefonts/noto-emoji/tree/main/fonts NotoColorEmoji_WindowsCompatible.ttf. This font have CBDT table, bitmaps inside. And I came across bug that heavily affects performance.

      Shortly: in https://github.com/qt/qtbase/blob/dev/src/gui/text/freetype/qfontengine_ft.cpp we have variable 'cacheEnabled' that is set to false when font to be rendered is not scalable (line #780). So glyphs aren't cached and every time engine loads it directly from font. which means it loads colored .png files under the hood again and again, so it obviously affects performance, especially on big texts with a lot of emojis, in our case.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            graullon Sergey Hrushak
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes