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

Provide a means to get the system macOS font with monospaced digits

    XMLWordPrintable

Details

    • macOS

    Description

      On macOS the Cocoa API provides a means to get the system font but with monospaced digits - https://developer.apple.com/documentation/appkit/nsfont/1528205-monospaceddigitsystemfontofsize?language=objc - which stops it from appearing to change the position of the digits when updating from 1 to 2 for instance. This would make it easier for numbers to be displayed which on Windows do have the same width even with proportional width fonts. A monospaced font is not ideal here because it is used for everything and not just digits and therefore it would look out of place and considerably different to other applications on the same setup.

      There is more information about the problem in general with non monospaced digits here - https://blog.usejournal.com/proportional-vs-monospaced-numbers-when-to-use-which-one-in-order-to-avoid-wiggling-labels-e31b1c83e4d0 - which show cases the problems more clearly.

      Attachments

        1. number_width_differs.png
          number_width_differs.png
          242 kB
        2. qt5table.zip
          1 kB
        3. wigglingDigits.zip
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            andysh Andy Shaw
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes