Important: Please read the Qt Code of Conduct -

OpenType font looks shaggy in Windows.

  • I'd like to use Adobe Source Code Pro OpenType font (otf) in QPlainTextEdit, but it looks shaggy when I use it in Qt 5.4.2, Windows 8.1.
    TrueType font looks good.
    Do I miss something or is this a bug of QPlainTextEdit?

    screenshot of otf
    screenshot of ttf

    #include <QApplication>
    #include <QPlainTextEdit>
    int main(int argc, char *argv[])
      QApplication a(argc, argv);
      QPlainTextEdit editWidget;
      editWidget.setFont(QFont("Source Code Pro"));;
      return a.exec();

    Thanks in advance.

Log in to reply