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

DirectWrite don't handle CBDT, COLRv1, sbix, SVG color fonts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0
    • None

    Description

      Hello there! I'm trying to use NotoColorEmoji_WindowsCompatible.ttf (https://github.com/googlefonts/noto-emoji) build to show some emojis via Qt Widgets (QTextEdit etc) on Windows. Unfortunately emoticons don't show at all. While do some searching I found github issue in Noto Color Emoji font repository https://github.com/googlefonts/noto-emoji/issues/43 which describes problem of this font and implies that is should work through DirectWrite but that is not a Qt case. Also more searching takes us to another article: https://learn.microsoft.com/en-us/windows/win32/directwrite/what-s-new-in-directwrite-for-windows-8-consumer-preview which clearly states that starting from Windows 10 Anniversary Update DirectWrite supports fonts with SBDT, COLR, SVG, sbix tables. Qt indeed supports rendering COLRv0 color fonts but for today its far from enough. To reproduce this bug you can install https://github.com/googlefonts/noto-emoji/tree/main/fonts NotoColorEmoji_WindowsCompatible.ttf on Windows, than use any QT app to load font and place emojis - you will get a substitute instead of emojis from this font. Also I suspect all this problems affects Direct2D font rendering backend too.

      Attachments

        1. Code_2024-02-07_23-05-42.png
          Code_2024-02-07_23-05-42.png
          8 kB
        2. colr_test.cpp
          0.7 kB
        3. directwrite-colr.diff
          13 kB

        Issue Links

          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:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes