Results 1 to 7 of 7

Thread: Font not Antialiasing

  1. #1
    Join Date
    Jan 2007
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Font not Antialiasing

    Hello,
    I must first say that I am new to Qt and have been trying out the open source edition and as a relatively experienced C++ and Win32 programmer, I must say I am thrilled with the quality and depth of Qt. My hat is off to the fine work done with this library.

    I am noticing a font issue that somebody might be able to shed some light on.

    I am using qt-x11-opensource-4.2.2 on mandriva 2007.0.

    Here is what I am seeing:

    Using Qt Designer, I am noticing that with the Antialiasing font setting to true, that the font is properly Antialiased in my Ui Form as expected, but only in Qt Designer. Likewise, when I set antialiasing to false, the expected behaviour occurs.

    However, at my application's runtime, the font is not antialiased.
    I notice that also in qtconfig that this same font, Sans Serif, 9 pt, normal, is not antialiased.

    Any suggestions as to how I can get this font to show up antialiased at runtime in my application?

    Thank you,
    Charles

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Font not Antialiasing

    Hope this helps: Mandriva and Qt4.2 font problems. Thanks go to wysota in case it does..
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    ChasW (20th January 2007)

  4. #3
    Join Date
    Jan 2007
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Font not Antialiasing

    I commented the entire body of the file:
    /etc/fonts/conf.d/02-mdk-disable-antialias.conf
    to disable its effect and it corrected the problem.

    Since no other application was affected by this issue and since the font I am using is not listed in that file, this is most likely a Qt bug indeed.

    Thank you for your help with this and thank you to Wysota.

    Charles

  5. #4
    Join Date
    Mar 2006
    Location
    Mountain View, California
    Posts
    489
    Thanks
    3
    Thanked 74 Times in 54 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font not Antialiasing

    Quote Originally Posted by ChasW View Post
    Since no other application was affected by this issue and since the font I am using is not listed in that file, this is most likely a Qt bug indeed. Charles
    But wait! Since no other distro or system is affected, won't this most likely be a Mandriva bug instead? I'm not seeing it on My FreeBSD system, nor have I seen it on Fedora, Debian or Kubuntu systems.

  6. #5
    Join Date
    Jan 2007
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Font not Antialiasing

    Perhaps.

    Fortunately, semantics such as "most likely" are lead-ins to some guesswork. Certainly the problem resides with the font size and the window manager's willingness to render antialias for that given size and font family as it pertains only to the Qt application at runtime. As I said before, other applications are unaffected.

    Whether it happens on other distributions versus whether it happens with other apps on mandriva is helpful for deduction and initial issue identification only.

    I guess it might be worth mentioning that the previous version of Qt did not have this problem on this same OS.

    Anyhow, the resolution is trivial enough.

    Charles

  7. #6
    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 not Antialiasing

    I've been in contact with Trolltech support about the problem for quite a long time but they were unable to reproduce the problem. The problem is obviously in Qt, as Qt4.1 works fine with the exact same installation whereas Qt4.2 does not.

    Do you have a vanilla Mandriva installation or did you upgrade it with some cooker packages or whatsoever?

  8. #7
    Join Date
    Jan 2007
    Posts
    26
    Thanks
    10
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Font not Antialiasing

    Quote Originally Posted by wysota View Post
    Do you have a vanilla Mandriva installation or did you upgrade it with some cooker packages or whatsoever?
    No packages from cooker or contrib branches are installed, but quite a few from devel/2007.0/i586/media/main/release branch are installed as well as quite a few local installs that i compiled, as well as all applicable "updates" to existing packages (there were quite a few of these) but nothing "that should" have affected the Qt4.2.2 build or install.

    I did leave all previous rpm-based Qt development packages installed prior to building Qt4.2.2 although Qt4.2.2 is the first that I have built from source for this Mandriva installation.

    Another thing I am noticing, which may be of little consequence, but from Qt Designer 4.2.2 Open Source Edition, when I "Preview in" Cleanlooks Style, it seems to be loading a different palette from the palette that is used at runtime for any of the new 4.2.2 apps I have built.

    I am making this guess because the window color from the "Preview in" Cleanlooks Style is different (slightly "pinker") than the window color that results from running a newly built app with Cleanlooks as the qtconfig default, or one built with QApplication::setStyle("cleanlooks");

    As far as being a vanilla installation, my best answer is "no", unfortunately. I am happy to answer specific questions regarding the details of my installation, however.

Similar Threads

  1. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36
  2. couldn't open fontconfigs chosen font with Xft!!!
    By Kenneth Freidank in forum Qt Programming
    Replies: 0
    Last Post: 5th October 2006, 03:14
  3. how to use user define font
    By numen in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2006, 10:25
  4. Why QStyle dosen't changes the standard font?
    By Dark_Tower in forum Newbie
    Replies: 8
    Last Post: 31st March 2006, 02:49
  5. Determine system font
    By niala in forum Qt Programming
    Replies: 2
    Last Post: 21st March 2006, 22:45

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.