Results 1 to 3 of 3

Thread: Font issues: Qt3 Vs Qt4

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Font issues: Qt3 Vs Qt4

    I all, i noticed a strange behaviour in how the fonts are rendered by Qt4 Applications compared to GTK and/or Qt3 (KDE3.5.x)

    Here's a quick example:
    IMAGE1: http://img520.imageshack.us/img520/9798/yaf7ge6.png

    And a detailed one:
    IMAGE2: http://img145.imageshack.us/img145/7676/qt3qt4kc2.png


    Qt3 on the left, Qt4 on the right, as you can see, rendering done by qt3 is much more sharper, qt4 tend to smooth out the font, and i would like to have qt4 one output like qt3 one.
    Also i got the same result in another gentoo system (tried both 32 and 64 bit)

    Some relevant info, maybe:
    Qt Code:
    1. > xrdb -q |grep Xft
    2. Xft.antialias: 1
    3. Xft.autohint: 0
    4. Xft.dpi: 96.000000
    5. Xft.hinting: 1
    6. Xft.hintstyle: hintfull
    7. Xft.rgba: rgb
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. cat ~/.fonts.conf
    2. <?xml version="1.0"?>
    3. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    4. <fontconfig>
    5. <match target="font" >
    6. <edit mode="assign" name="rgba" >
    7. <const>rgb</const>
    8. </edit>
    9. </match>
    10. <match target="font" >
    11. <edit mode="assign" name="hinting" >
    12. <bool>true</bool>
    13. </edit>
    14. </match>
    15. <match target="font" >
    16. <edit mode="assign" name="hintstyle" >
    17. <const>hintfull</const>
    18. </edit>
    19. </match>
    20. <match target="font" >
    21. <edit mode="assign" name="antialias" >
    22. <bool>true</bool>
    23. </edit>
    24. </match>
    25. </fontconfig>
    To copy to clipboard, switch view to plain text mode 

    I'm on a gentoo system, using:
    freetype 2.3.5-r2 with BC support
    qt 3.3.8-r4
    qt 4.3.2
    Xorg version 7.2

    Is this a known issue or am i missing something?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Font issues: Qt3 Vs Qt4

    Is it an issue? Qt4 just antialiases your fonts. In my opinion they look better than the ones in Qt3, but if you insist on disabling antialiasing, it should be possible either by changing fontconfig settings (disable antialiasing for some apps) or maybe by adjusting some settings in qtconfig (not sure about that though). For your widgets you can disable antialiasing by clearing an appropriate render hint for the painter.

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Font issues: Qt3 Vs Qt4

    Quote Originally Posted by wysota View Post
    Is it an issue? Qt4 just antialiases your fonts. In my opinion they look better than the ones in Qt3, but if you insist on disabling antialiasing,
    Even Qt3 antialiased my fonts, please, try to look better to the image i posted, so i don't insist on disabling antialiasing i'm definitely using it.
    it should be possible either by changing fontconfig settings (disable antialiasing for some apps) or maybe by adjusting some settings in qtconfig (not sure about that though). For your widgets you can disable antialiasing by clearing an appropriate render hint for the painter.
    I don't mind changing antialiasing config on a 'per-application' basis, i just would like Qt4 to antialias my fonts like qt3 and/or gtk do;
    instead, it just seem to ignore or react strange to the hintfull parameter, and yes, it appears an issue to me, because all of my gtk and qt3 apps look (still antialiased) different.
    qtconfig does not allow to change anithing about antialiasing.

    Thanks anyway for answering.

Similar Threads

  1. Font size calculation when painting in a QImage
    By Ishark in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2007, 22:22
  2. Automatic font selection
    By NTwoO in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 27th April 2007, 12:40
  3. How to prevent table header from font change.
    By kenny_isles in forum Qt Tools
    Replies: 1
    Last Post: 14th February 2007, 19:01
  4. Font not Antialiasing
    By ChasW in forum Qt Programming
    Replies: 6
    Last Post: 21st January 2007, 18:12
  5. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36

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.