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. How to disable antialiasing when drawing text
QtWS25 Last Chance

How to disable antialiasing when drawing text

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.3k 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.
  • I Offline
    I Offline
    ibingow
    wrote on last edited by
    #1

    if i create the qapplication like this
    QApplication a(argc, argv, true);

    for the font
    font.setStyleStrategy(QFont::NoAntialias);
    
    
    And also close the system antialiasing by editing /etc/fonts/conf.d/10-antialiasing.d
    
    
    then the antialiasing mode is disabled(English words are ok).
    
    
    But if i create a non-Gui qapplication 
    QApplication a(argc, argv, false);
    
    
    then the text is always antialiasing! Because my application is running on a server, i don't want to start X, so can any one help me?
    
    
    my application converts a html to an image, the send to a led. Antialiasing text looks terrible.
    
    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      You can also disable antialiasting as a [[doc:QPainter]] render hint, I believe.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        ibingow
        wrote on last edited by
        #3

        I tried. It does not work.
        [quote author="Andre" date="1322471848"]You can also disable antialiasting as a [[doc:QPainter]] render hint, I believe. [/quote]

        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