Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0 Beta 1
-
None
-
Windows 8
Qt 5 beta
-
3a9b01127054901293b177e538eb8cfa3937e9fe
Description
I'm developing a game based on pixel art.
It seems that the text element does not have an option to disable the anti aliasing, but QFont does.
Do I went and modified the QQuickText class and included this line:
d->font.setStyleStrategy(QFont::NoAntialias);
right after this block:
d->sourceFont = font;
QFont oldFont = d->font;
d->font = font;
With this custom text element plus this line in QML:
renderType: Text.NativeRendering
I was able to display the text the way I wanted:
http://purpleorangegames.com/images/gameScreenshot.png
You can zoom in and see that it is not anti-aliased, I'm using Windows 8.