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

Qt fails to consider dual-width fonts mono with fontconfig

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.3.0 RC1, 5.11.0 Beta 3
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Environment:
      Anything fontconfig.

      Description

      In platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp, Qtbase determines the font's monospace-ness by checking for spacing_value >= FC_MONO (100). This check fails for CJK mono fonts, which by wcwidth and Unicode East Asian Something standards have CJK glyphs that are twice the width of latin glyphs. Those fonts are given a spacing of FC_DUAL (90) by fc, which fails the test. The FreeType backend should be fine as FT_FACE_FLAG_FIXED_WIDTH takes whatever the sfnt font says about itself, and all the fonts we use these days are sfnt anyway.

      This bug affects font selection dialogs like the one used for QFontDialog::getFont(). Based on git blame, it should affect everything since Qt 5.3.0rc1.

        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:
              arturia2e5 Mingye Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes