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

Emojis are drawn at a wrong place in Qt Quick with non-integer high-DPI scaling factor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 5.12.3, 5.12.6, 5.13.2
    • Quick: Other
    • openSUSE Tumbleweed 20190525, Noto Color Emoji Font
      Android 9 emulator, hw.lcd.density=420

      The following code can be runned using qmlscene and displays some text followed by an emoji.

      import QtQuick 2.12
      
      Item {
          width: 300
          height: 100
      
          Text {
              anchors.centerIn: parent
      
              font.pixelSize: 30
              text: "Here is a bug: \u{1f41e}"
          }
      }
      

      When the code is runned with QT_SCALE_FACTOR set to an integer value, such as 1, 2, 3 (e.g. env QT_SCALE_FACTOR=2 qmlscene bug.qml), the emoji is displayed correctly.

      But when QT_SCALE_FACTOR is set to a non-integer value, such as 1.5 (e.g. env QT_SCALE_FACTOR=1.5 qmlscene bug.qml), the emoji is displayed at a wrong place, in bad quality and has a wrong size.

      Also, if i run qmlscene with --textrendertype native, then all text is drawn at a wrong place, in bad quality and has a wrong size.

      I can reproduce this on Linux and on Android (did not test on other platforms), but only with Qt Quick applications. Qt Widgets applications seem to be not affected.

        1. qtbug76123.tar.gz
          2 kB
        2. Screenshot_20191003_153647.png
          Screenshot_20191003_153647.png
          39 kB
        3. screenshot-1.5x.png
          screenshot-1.5x.png
          16 kB
        4. screenshot-1.5x-textrendertype-native.png
          screenshot-1.5x-textrendertype-native.png
          12 kB
        5. screenshot-1x.png
          screenshot-1x.png
          13 kB
        6. screenshot-2x.png
          screenshot-2x.png
          23 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            w00t Robin Burchell
            vovams Vova Mshanetskiy
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes