Details
Description
Problem:
System Preferences > General > Use LCD font smoothing overrides the font smoothing method specified in the css with the property -webkit-font-smoothing.
If "Use LCD font smoothing" is enabled the css property -webkit-font-smoothing has no effect. The font always looks like it is smoothed with subpixel-antialiased. This becomes noticeable most when using Icon fonts with small details.
To showcase the issue I'm using the site http://fortawesome.github.io/Font-Awesome/examples/#fixed-width
The Home icon should have a transparent line between the roof and the actual house.
I also attached screenshots highlighting the issue in case they change this site. (The left site is always rendered with Chrome and the right site with QWebView)
Steps to reproduce:
1. Compile the attached App
2. Open System Preferences > General
3. Enable "Use LCD font smoothing" (at the bottom)
4. Start the attached App
5. Scroll to the home icon
6. Check if there is a transparent line between the roof and the house
Expected: it should exist
Result: I does not exist because it is covered up by antialiasing
7. Close the test app
8. Go to System Preferences > General
9. Disable "Use LCD Font Smoothing"
10. Start the attached App again
11. Scroll to the home icon
12. Check if there is a transparent line between the roof and the house
Expected: it should exist
Result: I does exist
Note: Awesome fonts sets the css property -webkit-font-smoothing to antialiased, otherwise the icons will look blurry and some details are lost especially with smaller icons. This setting works perfectly fine with Safari which is also using Webkit. Changing the RenderHints of QWebView has no effect neither.
I tested this issue with Qt 5.2.1 (only on 10.8.5) and Qt 5.3.1 with 10.8.5, 10.9.4 and 10.10 dev preview 4
Attachments
Issue Links
- relates to
-
QTBUG-39487 When a font referenced via CSS only provides the normal style then it should synthesize the other styles on request
- Closed
For Gerrit Dashboard: QTBUG-40396 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
90573,6 | Add QFont strategy to disable subpixel antialiasing | dev | qt/qtbase | Status: MERGED | +2 | 0 |
90574,2 | Support -webkit-font-smoothing: antialiased | dev | qt/qtwebkit | Status: MERGED | +2 | 0 |
97671,2 | Respect NoSubpixelAntialias in QCoreTextFontEngine::imageForGlyph | 5.4 | qt/qtbase | Status: MERGED | +2 | 0 |