Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40396

OS X: -webkit-font-smoothing has no effect when “Use LCD font smoothing” is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.4.0
    • 5.2.1, 5.3.1
    • WebKit
    • None
    • OS X with LCD font smoothing enabled
    • macOS
    • 81905b2cdab344e33550abd571046e65816cb416

    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

        1. font-smoothing.tar.gz
          3 kB
          Timo Christ
        2. withLCDSmoothing.png
          19 kB
          Timo Christ
        3. withoutLCDSmoothing.png
          18 kB
          Timo Christ

        Issue Links

          For Gerrit Dashboard: QTBUG-40396
          # Subject Branch Project Status CR V

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              timo.christ Timo Christ
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes