Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Fonts are not antialiased in QT 5.7 OpenSource on Windows 10.
Qt 6.11 is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 716 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • vhrynchukV Offline
    vhrynchukV Offline
    vhrynchuk
    wrote on last edited by
    #1

    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.

    vhrynchukV 1 Reply Last reply
    0
    • vhrynchukV vhrynchuk

      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.

      vhrynchukV Offline
      vhrynchukV Offline
      vhrynchuk
      wrote on last edited by
      #2

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

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved