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

          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