Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
5.13.1, 6.9
-
None
-
Fontconfig version 2.13.1.
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.