qt: sub-pixel font rendering is unavailable in certain situations
The blending needs to be done manually for sub-pixel font rendering to work properly (as OpenGL blending works pixel-by-pixel basis). And for that, the background color must be known.
In order to know the background color, the contents behind a transparent QQuickWindow
needs to be forwarded to the scene graph. This needs to be investigated if it can be done without copying block of textures.
This issue can be realized in the following condition:
- There are stuff showing behind the Quick Window. Such as, composition blur effect (KDE blur) or the embedded video content.
- FadingEdgeListView (or item layer in general) is active. / Background of the text or label is (semi) transparent.
Currently, it is a problem even background color is solid and can be retrieved. I probably need to reintroduce the backgroundColor
property, which will only be needed for enabling sub-pixel font rendering.
For embedded video view, or when 1 is the case in general, the solution will not be as trivial.
FadingEdgeListView is not active (proper sub-pixel font rendering):
FadingEdgeListView is active (improper sub-pixel font rendering, as background color is treated full transparent due to scene graph layering):