Results 1 to 3 of 3

Thread: Why fonts in Qt are appearing blurry or pixelated?

  1. #1
    Join Date
    May 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Exclamation Why fonts in Qt are appearing blurry or pixelated?

    All my fonts are appearing pixelated, so I used AntiAliasing but it isn't helping. As you can see in the image itself:

    oNkvk.png

    This is the code I am using:

    Qt Code:
    1. butt1 = QtWidgets.QLabel("""Scrappr""")
    2. font = QtGui.QFont()
    3. font.setStyleStrategy(QtGui.QFont.PreferAntialias)
    4. font.setPixelSize(22)
    5. font.setFamily('Segoe UI Bold')
    6. butt1.setFont(QtGui.QFont(font))
    To copy to clipboard, switch view to plain text mode 

    Edit 1: I also tried different combinations of ClearType text but It didn't work out. I think because for me, by default all the text appears good on windows and chrome but with Qt, it becomes pixelated. So it's probably not a windows problem...
    Last edited by Abhay_Salvi; 11th May 2020 at 15:13.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Why fonts in Qt are appearing blurry or pixelated?

    Quote Originally Posted by Abhay_Salvi View Post
    All my fonts are appearing pixelated, so I used AntiAliasing but it isn't helping. As you can see in the image itself:

    So it's probably not a windows problem...
    It is is happening to all the text in your application then it is probably a Windows feature whereby it takes non-DPI aware applications, renders them off-screen, and scales them on to the display. Can accentuate jaggy edges and makes all text look fuzzy. You seem to be using PyQt, so dealing with this might be tricky. What Qt version?

  3. #3
    Join Date
    May 2020
    Posts
    4
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Why fonts in Qt are appearing blurry or pixelated?

    I have both PyQt and PySide2 version (5.14.2)...

Similar Threads

  1. Adding Arabic fonts and CJK (China Japan Korean) fonts
    By kishore7771 in forum Qt Programming
    Replies: 0
    Last Post: 30th July 2013, 19:33
  2. Replies: 9
    Last Post: 14th June 2013, 09:18
  3. modern blurry traslucent effect... it is possible on QT?
    By javimoya in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2010, 01:09
  4. transparent QScrollArea and blurry scrolling
    By titanandrews in forum Qt Programming
    Replies: 2
    Last Post: 17th January 2010, 01:35
  5. Windows not appearing in XP.
    By beardybloke in forum Qt Programming
    Replies: 7
    Last Post: 24th October 2007, 18:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.