PDA

View Full Version : Font not Antialiasing



ChasW
20th January 2007, 21:27
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

jpn
20th January 2007, 21:37
Hope this helps: Mandriva and Qt4.2 font problems (http://blog.wysota.eu.org/archives/2006/10/#e2006-10-25T22_24_55.txt). Thanks go to wysota in case it does.. ;)

ChasW
20th January 2007, 22:17
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

Brandybuck
20th January 2007, 23:32
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.

ChasW
21st January 2007, 08:13
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

wysota
21st January 2007, 13:19
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?

ChasW
21st January 2007, 18:12
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.