mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Fix fontconfig monospace binding overriding app-specific fonts (#5700)
Change monospace match from mode="assign" binding="strong" to mode="append" binding="same" so the system font acts as a fallback instead of overriding explicit app font configs like Ghostty's font-family. Add migration to fix existing user configs. Fixes #5675
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<test name="family" qual="any">
|
||||
<string>monospace</string>
|
||||
</test>
|
||||
<edit name="family" mode="assign" binding="strong">
|
||||
<edit name="family" mode="append" binding="same">
|
||||
<string>JetBrainsMono Nerd Font</string>
|
||||
</edit>
|
||||
</match>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
echo "Fix fontconfig monospace binding so app-specific fonts are not overridden"
|
||||
|
||||
if [[ -f ~/.config/fontconfig/fonts.conf ]] && command -v xmlstarlet >/dev/null 2>&1; then
|
||||
xmlstarlet ed -L \
|
||||
-u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/@mode' \
|
||||
-v "append" \
|
||||
-u '//match[@target="pattern"][test/string="monospace"]/edit[@name="family"]/@binding' \
|
||||
-v "same" \
|
||||
~/.config/fontconfig/fonts.conf
|
||||
fc-cache -f >/dev/null 2>&1
|
||||
fi
|
||||
Reference in New Issue
Block a user