Stefan Schimanski wrote:
Hi!
After compiling the latest trunk (with the pixmap cache optimization in
the GuiPainter) I noticed a very bad font rendering. I attached two
pictures,
Maybe I'm blind but I don't see big differences between the two pictures.
the first showing trunk with normal antialiasing, the right
showing direct font rendering with the pixmap cache disabled, i.e. Qt is
using sub-pixel rendering. On a CRT there is no difference at all, on an
LCD the left one looks bad.
On Windows, enabling or disabling the cache has strictly no effect on my
LCD screen.
I haven't found a way to enable sub-pixel rendering yet on a pixmap. I
would guess that it can only be implemented with an alpha channel for
red/green/blue each, but a QPixmap only has one alpha channel for all.
This is really bizarre in that, even when the cache is disabled, we
still uses a backing QPixmap. What you are saying means that painting a
QPixmap onto the screen does not render the same as painting it onto
another QPixmap... weird isn't it?
Hope there is a solution for this.
One solution would be to use a QImage instead. This would also enable to
use the cache on X11.
But using the global QPixmapCache is the Qt recommended way to cache
painted string of text; so there might be some settings that we don't do
correctly.
Another solution would be to let the user decides to disable the cache
in the preference settings.
Abdel.