WebView with a transparent background doesn't render text with subpixel rendering (cleartype)
Unsolved
General and Desktop
-
I'm making an addon for a Qt 6 app (Anki) that allows setting an image for window background. The app uses WebViews for most of its UI. To make the background image visible, I am setting WebView background to a transparent color. This makes the text fail to be rendered in ClearType on Windows.
In the screenshot below, the menu (View, Tools) text is rendered over an image and gets subpixel rendering, while the word Decks below is coming from a WebView and appears in a very sad way.
How can I make WebView render text in ClearType even when its background is transparent?
(Using Qt 6.3.1, PyQt 6.3.1, Python 3.9.7 on Windows 10 21H2 19044.1766. Not sure if Linux has this issue as well.)