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

Bold fonts not being detected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P1: Critical P1: Critical
    • None
    • 5.8.0
    • GUI: Font handling
    • None
    • ArchLinux, Qt 5.8, also tested with latest dev version as of this bug report

      For many fixed-width fonts, setting a QFont to bold, or changing it's weight appropriately, does not cause a bold font to be displayed.

      This was originally detected in Konsole, but I've been able to reproduce it with a small example, attached.

      Tested with fonts: Hack, Liberation Mono, Nimbus Mono, FreeMono, and Fira Mono. The only fixed-width font not affected seems to be DejaVu Sans Mono. Attached is an example output with Hack, and one with DejaVu Sans Mono. Serif and sans-serif fonts don't appear to be affected.

      If
      font.setStyleName("Bold")
      is used, the correct bold font is chosen, so it looks to be an issue with the font matching.

        1. BoldNotWorking_Hack.png
          BoldNotWorking_Hack.png
          6 kB
        2. BoldWorking_DejaVuSansMono.png
          BoldWorking_DejaVuSansMono.png
          6 kB
        3. main.cpp
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            mikelui Mike Lui
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes