I know this is the sort of nitpicky detail that maybe only one other person is ever going to care about, but GNOME 48 is shipping with a new default UI font that is a little too eager to do things like replace ‘->’ with ‘→’ and render ‘*I*’ as ‘∗I*’. It drives me nuts. Here’s a cheap and cheerful overlay that will erase this misfeature from the font, just in case you’re that one person.
self: super: {
adwaita-fonts = super.adwaita-fonts.overrideAttrs (oldAttrs: {
nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [
self.python3Packages.fonttools
];
preInstall = oldAttrs.preInstall or "" + ''
python - ../{mono,sans}/*.ttf <<EOF
import fontTools.ttLib as ttLib
import sys
for arg in sys.argv[1:]:
print(f"patching {arg}")
ttf = ttLib.TTFont(arg)
feats = ttf['GSUB'].table.FeatureList.FeatureRecord
for feat in feats:
if feat.FeatureTag == 'calt':
feats.remove(feat)
break
ttf.save(arg)
EOF
'';
});
}