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

Qt Incorrectly Reinterprets Fontconfig Preferences Leading to Inconsistent Font Rendering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.2
    • GUI: Font handling
    • None
    • Fontconfig
    • Linux/Wayland, Linux/X11

    Description

      Qt seems to re-call fontconfig with the preferred font obtained from fontconfig as the pattern, using the final obtained font sequence, which leads to an inconsistency with the result of fc-match -s. Specifically, when a monospaced font (containing only CJK characters) is configured as the preferred font for the sans-serif family, Qt applications incorrectly render all text using monospaced fonts, even for non-CJK characters.

      Steps to Reproduce:

      1. Configure fontconfig to use a monospaced font containing only CJK characters as the preferred font for the sans-serif family.
      2. Run an application that uses Qt's font handling mechanisms.
      3. Observe the font used in the Qt application for both CJK and non-CJK characters.

      Expected Behavior:

      Monospaced fonts should be applied only to CJK characters, while other characters should use a fallback sans-serif font as per the fontconfig configuration.

      Actual Behavior:

      All characters, including non-CJK ones, are rendered using monospaced fonts.

      Attachments

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

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            tjw123hh Jiawei Tang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes