Hi guys in this forum,
first i am rather beginner with Qt, but my question will require rather in-depth knowledge, therefore I didn't choose the beginners section.
My situation: I am currently using the QPainter.drawText function on a QImage. The QImage is then simply saved into a .bmp file. So far so good.
Challenge:
Currently a saved QImage looks like this (please click to see in proper size):
Screenshot_F.png
But I want it to be displayed "unchanged" and pixel-exact, like this:
Screenshot_T.png
You might ask yourself now how I got the proper result I want? Well there is 2 answers to that depending on the OS.
Windows: Simply switching off ClearType completely (with a free app called ClearType switch; saves time instead of you doing the work with the registry)
Linux(in my case CentOS): Switching off Smoothing etc right here:
Screenshot_S.jpg
I need to know how to use Qt in order to tell my app to NOT use those Smoothing, AntiAlias, Subpixel or Hinting Features at all.
The global settings as mentioned above are not usable, as I need my app to run anywhere without having to have admin-rights.
I did try things like
CustomFont.setStyleStrategy(QFont::NoAntialias);
CustomFont.setStyleStrategy(QFont::PreferBitmap);
CustomFont.setStyleStrategy(QFont::NoSubpixelAntia lias);
CustomFont.setHintingPreference(QFont::PreferNoHin ting);
CustomPainter.setRenderHint(QPainter::Antialiasing , false);
CustomPainter.setRenderHint(QPainter::HighQualityA ntialiasing, false);
they didn't help at all.
I am quite deperate to find a solution, appreciate any help on this.
Best regards
Bookmarks