[Qt-wince-interest] Anti-aliased text not working
Mark Hammond
mark.hammond at yale.edu
Fri Jun 27 02:09:00 CEST 2008
Hi,
I've run into an issue with anti-aliased text not working properly with Qt
on Windows CE. Anti-aliased text works fine in Wordpad on both CE5 and CE6,
and ClearType text works fine in Word Mobile on Windows Mobile 6.1
Professional; however, anti-aliased text does not work at all under Qt
except on CE6 where it works only up to a font size of 64 point.
Furthermore if you run the deform example application, the path that is
returned isn't nicely scalable, but rather has jagged edges as if the font
had been rasterized.
If you use the simple code here:
#include <QApplication>
#include <QLabel>
#include <QFont>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QFont testFont("Tahoma",64);
testFont.setStyleStrategy(QFont::PreferAntialias);
a.setFont(testFont);
QLabel label("Hello World");
label.show();
return a.exec();
}
the resulting text is not anti-aliased. Additionally if you up the font
size to 65 point it causes the application to crash. Painting text avoids
the crash, but is still not anti-aliased. Even on CE6 where anti-aliasing
seems to work, it stops working past 64 point size fonts.
I do have TrueType support built into the platforms, and I have set the
registry keys to enable anti-aliasing. Everything works fine in other apps,
just not in Qt.
Has anyone else run into this? Is there something I can do to enable proper
anti-aliasing support for fonts?
-Mark
More information about the Qt-wince-interest
mailing list