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

Support OpenType font features through fontconfig

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 5.13.1
    • Fix Version/s: None
    • Component/s: GUI: Font handling
    • Labels:
      None
    • Environment:

      Fontconfig version 2.13.1.

    • Platform/s:
      Linux/X11

      Description

      Fontconfig supports OpenType features, but it looks like Qt does not handle this.  As a concrete example, create a file called ~/.config/fontconfig/conf.d/00-features.conf with the following:

       
      <?xml version="1.0"?>
      <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
      <fontconfig>
          <match target="font">
              <test name="family">
                  <string>Source Code Pro</string>
              </test>
              <edit name="fontfeatures" mode="assign_replace">
                  <string>zero</string>
              </edit>
          </match>
      </fontconfig>

      Explanation:

      The font Source Code Pro has, by default, a dotted zero. But the font includes the "zero" OpenType feature which provides a slashed zero instead. The fontconfig rule above will enable the zero feature for Source Code Pro.

      This works in Pango-based applications, but does not appear to work in Qt. Pango applications get the slashed zero, but Qt applications still get a dotted zero.

      It'd be great if Qt could support OpenType features via fontconfig.

        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:
            cspiegel Chris Spiegel
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes