fontconfig fontfeature settings ignored by Firefox
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox114 | --- | fixed |
People
(Reporter: anderyos, Assigned: jfkthame)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/111.0
Steps to reproduce:
Under Linux... set global fontconfig settings to disable font ligatures... the settings is ignored by Firefox. Other apps (Gnome/GTK) honor the settings.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<match target="font">
<test name="family" compare="eq" ignore-blanks="true">
<string>Outfit</string>
</test>
<edit name="fontfeatures" mode="append">
<string>liga off</string>
</edit>
</match>
</fontconfig>
Actual results:
Font ligatures still enabled in Firefox
Expected results:
Firefox should honor user's fontconfig fontfeature settings as per Bug 1744765 (and merged patch).
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Layout: Text and Fonts' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
Adding the following block on Ubuntu 22.04 to ~/.config/fontconfig/fonts.conf:
<match target="font">
<test name="family" compare="eq" ignore-blanks="true">
<string>DejaVu Serif</string>
</test>
<edit name="fontfeatures" mode="append">
<string>liga off</string>
</edit>
</match>
Running echo -e "| worksheet |\n| buffering |\n| difficult |\n| finishing |\n| different |\n| efficient |" | pango-view --font="Dejavu Serif" --dpi 300 /dev/stdin (Example taken from ArchWiki) shows the difference but Firefox with
<!DOCTYPE html>
<style>
* {
font-family: "Dejavu Serif";
}
</style>
worksheet<br>
buffering<br>
difficult<br>
finishing<br>
different<br>
efficient
Does not.
| Assignee | ||
Comment 4•3 years ago
|
||
I haven't found much documentation about this, but from testing, it appears that it's necessary to call FcConfigSubstitute on the pattern with the kind parameter set to FcMatchFont in order for settings like this to be incorporated into the FcPattern. With this addition to our pattern initialization, the fontfeatures property behaves as expected.
| Assignee | ||
Comment 5•3 years ago
|
||
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Backed out for reftest failure on illformed-lang-tags-1.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/89e2d79c335113f6e4b947052616f60addb0544c
Log link: https://treeherder.mozilla.org/logviewer?job_id=412481379&repo=autoland&lineNumber=9519
Comment 9•3 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•3 years ago
|
Description
•