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

Some symbol glyphs are not rendered correctly on Macintosh

    XMLWordPrintable

    Details

    • Commits:
      a614bc6e39c8460ebe5b7a5aff546ca3219c8730

      Description

      Using Qt 5, certain symbol characters render incorrectly. Instead of the expected character, the empty box missing character glyph is used instead. This happens on Macintosh OSX 10.9.4 but not Windows 7. I haven't tested on any other systems.

      I can reproduce this using a custom built version of the 5.4-dev branch but I can also reproduce the same behavior using Qt Creator 3.2.0-rc1-opensource, which the About Qt Creator dialog says is based on Qt 5.3.1 (Clang 5.0 (Apple), 64 bit).

      The easiest way to reproduce this is to copy the following string and paste it into a Qt Creator 3.2 text editor: ∤∯∰≨≩≴≵⊚⊛⊜⊡⊾ℜ

      Instead of seeing the symbol characters, you will see a bunch of empty box glyphs.

      Alternately, you can use the attached example application that creates a label and displays it.

      I have attached screenshots of the attached example application built using Qt 4.8.6, in which the characters display correctly, and 5.4-dev, in which they display as empty boxes.

      Note that if you use the mouse to select the text of the label when built with Qt 5.4 and then copy to the clipboard, if you paste into another application, for example Text Wrangler, the correct text is displayed. So it's only the rendering of the text that is broken, not the internal representation of the text.

      The code for the attached example application is simply:

      #include <QApplication>
      #include <QLabel>
      #include <QHBoxLayout>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
      	QApplication a(argc, argv);
      	QWidget w;
      	QLabel l;
      	l.setTextInteractionFlags(Qt::TextSelectableByMouse);
      	QString text = QString::fromUtf8("∤∯∰≨≩≴≵⊚⊛⊜⊡⊾ℜ");
      
      	// Print the Unicode values (in hex) using qDebug() for reference.
      	QStringList charList;
      	foreach(QChar thisChar, text) {
      		charList << QString::number(thisChar.unicode(), 16);
      	}
      	qDebug() << charList.join(",");
      
      	l.setText("Qt " + QString::fromUtf8(qVersion()) + ": " + text);
      
      	QHBoxLayout layout;
      	layout.addWidget(&l);
      	w.setLayout(&layout);
      
      	w.show();
      
      	return a.exec();
      }
      

        Attachments

        1. Qt4_8_6_Screenshot.png
          Qt4_8_6_Screenshot.png
          11 kB
        2. Qt5_4_Screenshot.png
          Qt5_4_Screenshot.png
          9 kB
        3. Qt5MissingGlyphs.zip
          0.9 kB

          Issue Links

          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:
              aclight Adam Light
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes