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

Details

    • Bug
    • Resolution: Done
    • 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

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes