Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QPainter font antialiasing BUGGY
Qt 6.11 is out! See what's new in the release blog

QPainter font antialiasing BUGGY

Scheduled Pinned Locked Moved Mobile and Embedded
5 Posts 2 Posters 2.2k Views 1 Watching
  • 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.
  • R Offline
    R Offline
    rileo8
    wrote on last edited by
    #1

    Hi,

    I'm using QPAinter drawText to paint a text using a font.
    The problem is thata antialiasing is not working so the text is ugly to see.
    Here is the code:

    @ QPainter customPainter(this);
    QPen pen( QColor(0, 0, 0));
    pen.setWidth( 0 );
    customPainter.setPen( pen );
    customPainter.setBackground(QBrush(QColor(0, 0, 0)));
    customPainter.setBrush(QBrush(QColor(0, 0, 0)));

    customPainter.setRenderHint(QPainter::TextAntialiasing,true);

    QFontDatabase database;
    QFont font = database.font("Tw Cen MT", "Normal",40);
    customPainter.setFont(font);

    customPainter.drawText(0,0,300,50,Qt::AlignLeft,"Galileo");@

    Antialiasing of paths works great while on font it is ugly..

    I found that the problem seems to be in the Font antialiasing...it seems to be buggy on Qt (4.8) ..anyone had this issue?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rileo8
      wrote on last edited by
      #2

      I found that the problem seems to be in the Font antialiasing...it seems to be buggy on Qt (4.8) ..anyone had this issue?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You should check the "bug report system":http://bugreports.qt-project.org to see whether it's something known. Also are you using the latest version of Qt 4.8 ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rileo8
          wrote on last edited by
          #4

          Hi,

          im using this version:

          http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.zip.mirrorlist

          I already checked on the bug report but seems there is no issue like my...so maybe I'm doing something wrong?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            If you can come up with a minimal compilable example that reproduce this behavior then it might be a bug

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

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