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

SVG Icons are fuzzy on high DPI displays

    XMLWordPrintable

    Details

    • Platform/s:
      Android, iOS/tvOS/watchOS

      Description

      This is coming from my forum post: https://forum.qt.io/topic/133166/svgs-used-for-button-icons-are-fuzzy-on-highdpi-devices

      I didn't see any replies to it.  Google searching didn't reveal much of any other results...

      I'm building an app right now that targets Android and iOS.  Typically these devices are high DPI (e.g. `Screen.devicePixelRatio` will return a value higher than `1.0`).  On these screens, when I use an SVG file for a `ToolButton` and `Button`'s `icon.source`, I'm seeing these "fuzzy" SVGs.  When they are far away from the user, they might not notice, but when they look up close, they might be able to see the issue.

      Attached is a screenshot from my LG Q7+.  Notice how the text on the Button is nice and crisp, but the SVG looks really bad.  Like it was rasterized and a lower resolution and then up scaled.

      The SVG files I'm using come from Google's Material Design iconset, which are known to be "good" SVGs so they should not have any issues.

      Part of the point of using SVGs is that they scale seamlessly; they are not doing so in Qt right now. 

        Attachments

        1. fuzzy_icons_android_highDPI.png
          11 kB
          Ben S
        2. image-2022-03-10-22-42-58-842.png
          42 kB
          Ben S
        3. qtbug99533.zip
          7 kB
          Mitch Curtis
        4. qt-dev-dpr-2-emulator.png
          445 kB
          Mitch Curtis
        5. qt-dev-dpr-2-emulator-settings-svg.png
          453 kB
          Mitch Curtis
        6. Screenshot (Mar 11, 2022 8 30 05 PM).png
          73 kB
          Ben S
        7. screenshot lg q7 plus.png
          91 kB
          Ben S
        8. settings.svg
          0.3 kB
          Ben S
        9. start.svg
          0.3 kB
          Ben S
        10. stop.svg
          0.3 kB
          Ben S

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              mitch_curtis Mitch Curtis
              Reporter:
              define-private-public Ben S
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes