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

Support OpenType font features through fontconfig

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.13.1
    • GUI: Font handling
    • None
    • Fontconfig version 2.13.1.

    • 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

            esabraha Eskil Abrahamsen Blomfeldt
            cspiegel Chris Spiegel
            Votes:
            11 Vote for this issue
            Watchers:
            13 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes