On Tue, 2 May 2017 19:13:02 -0700, Emma Humphries wrote:
> On May 15th we will disable the preference enabling selecting an
> alternate theme on
bugzilla.mozilla.org and all users will switch to
> the default skin.
For those that prefer sharp well-hinted fonts, the simple solution with
gfx.downloadable_fonts.enabled;false
has some problems:
1. PDF.js for example depends on downloaded fonts for document fonts.
2. Although system fonts are usually sufficient to read Latin
script in HTML, many sites assume downloaded fonts are
available for sets of icons for close buttons, dropdowns, etc.
FWIW changes in the pref are re-read on reload of the page.
A solution that only disables Fira Sans and is effective for
bugzilla.mozilla.org when using the Linux port of Firefox is
% mkdir -p ~/.config/fontconfig/conf.d
% cat > ~/.config/fontconfig/conf.d/50-fira.conf <<EOF
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="scan">
<test name="file" compare="contains">
<string>DejaVuSans-as-Fira</string>
</test>
<edit name="fullname">
<string>Fira Sans</string>
</edit>
</match>
<match target="scan">
<test name="file" compare="contains">
<string>DejaVuSans-Bold-as-Fira</string>
</test>
<edit name="fullname">
<string>Fira Sans Bold</string>
</edit>
</match>
</fontconfig>
EOF
% mkdir -p ~/.local/share/fonts
% ln -s /usr/share/fonts/dejavu/DejaVuSans.ttf ~/.local/share/fonts/DejaVuSans-as-Fira.ttf
% ln -s /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf ~/.local/share/fonts/DejaVuSans-Bold-as-Fira.ttf
% fc-list : file fullname | grep Fira
/home/bzuser/.local/share/fonts/DejaVuSans-as-Fira.ttf: :fullname=Fira Sans
/home/bzuser/.local/share/fonts/DejaVuSans-Bold-as-Fira.ttf: :fullname=Fira Sans Bold
A restart of Firefox may be necessary to clear out its cached font info.
There is also some use of Fira Sans SemiBold in b.m.o, but this
appears to be limited. If you go back and edit 50-fira.conf after
adding the fonts, then the scan is not necessarily performed.
"fc-cache --force" makes this happen.
Assuming your favourite font has a suitable licence, the same could be
achieved on other platforms my copying the font and changing the fullname.
Thank you to the BMO team for making this possible through src: local().