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

QFontInfo::fixedPitch() is false for Noto Sans Mono

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2, 6.1.0
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Platform/s:
      Linux/X11

      Description

      It looks like it's usually possible to use QFontInformation::fixedPitch() based on a font with a given family - here's an example using PySide6:

       

      >>> from PySide6.QtGui import QFontInfo, QFont
      >>> from PySide6.QtWidgets import QApplication
      >>> a = QApplication([])
      >>> f = QFont()
      >>> f.setFamily('DejaVu Sans Mono')
      >>> f.fixedPitch()
      False
      >>> i = QFontInfo(f)
      >>> i.family()
      'DejaVu Sans Mono'
      >>> i.fixedPitch()
      True
      

      However, the same doesn't work for Noto Sans Mono, despite it being a fixed-width font:

      >>> f = QFont()
      >>> f.setFamily('Noto Sans Mono')
      >>> i = QFontInfo(f)
      >>> i.family()
      'Noto Sans Mono'
      >>> i.fixedPitch()
      False
      

        Attachments

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

          Activity

            People

            Assignee:
            esabraha Eskil Abrahamsen Blomfeldt
            Reporter:
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes