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

Qt fails to consider dual-width fonts mono with fontconfig

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.3.0 RC1, 5.11.0 Beta 3
    • GUI: Font handling
    • None
    • 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

            esabraha Eskil Abrahamsen Blomfeldt
            arturia2e5 Mingye Wang
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes