Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Fonts are not antialiased in QT 5.7 OpenSource on Windows 10.



  • Hello,
    This is my firs post on the forum

    I’m using QTextBrowser to to show formatted text. Unfortunately it’s not antialised and looks way too ragged.

    I tried the following without any success

    1. Set antialising globally
    QFont f = QApplication::font();
    f.setStyleStrategy(QFont::PreferAntialias);
    QApplication::setFont(f);
    
    1. Tried antialising on a label
    QFont f = ui->labelTest->font();
    f.setStyleStrategy(QFont::PreferAntialias);
    ui->labelTest->setFont(f);
    
    

    Label is not antialiased

    1. Output text in QTextBrowser with
    void QTextCursor::insertText(const QString &text, const QTextCharFormat&format)
    

    using

    format.setFontStyleStrategy(QFont::PreferAntialias);
    

    I have Windows ClearType turned on.

    Nothing helps. How to make Qt use antialiasing when it draws text? Thank you.



  • @vhrynchuk
    Sorry, my mistake. It does antialising. It does it just noticeably worse than Chrome or Adobe PDF reader.


Log in to reply