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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.2, 6.1.0
    • GUI: Font handling
    • None
    • 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

            esabraha Eskil Abrahamsen Blomfeldt
            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