1
0
Fork 0

setup default font using fontconfig

This commit is contained in:
Massaki Archambault 2021-04-10 16:25:27 -04:00
parent 1b6e1e65e2
commit 380421fb82
9 changed files with 85 additions and 2 deletions

View File

@ -0,0 +1,80 @@
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- default font -->
<match>
<edit mode="prepend" name="family">
<string>sans-serif</string>
</edit>
</match>
<!-- default sans-serif -->
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="same"><string>Noto Sans</string></edit>
</match>
<!-- default serif -->
<match target="pattern">
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="same"><string>Noto Serif</string></edit>
</match>
<!-- default mono -->
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit name="family" mode="prepend" binding="same"><string>Hack Nerd Font</string></edit>
<edit name="family" mode="append" binding="same"><string>Hack</string></edit>
<edit name="family" mode="append" binding="same"><string>Noto Sans Mono</string></edit>
</match>
<!-- disable bitmap fonts -->
<match target="font">
<edit name="embeddedbitmap" mode="assign">
<bool>false</bool>
</edit>
</match>
<!-- fallback -->
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Open Sans</family>
<family>Droid Sans</family>
<family>Ubuntu</family>
<family>Roboto</family>
<family>NotoSansCJK</family>
<family>Source Han Sans JP</family>
<family>IPAPGothic</family>
<family>VL PGothic</family>
<family>Koruri</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Droid Serif</family>
<family>Roboto Slab</family>
<family>IPAPMincho</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Sans Mono</family>
<family>Inconsolatazi4</family>
<family>Ubuntu Mono</family>
<family>Droid Sans Mono</family>
<family>Roboto Mono</family>
<family>IPAGothic</family>
</prefer>
</alias>
</fontconfig>

View File

@ -8,6 +8,6 @@ if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
echo "Redirecting stdout to $log_stdout" echo "Redirecting stdout to $log_stdout"
echo "Redirecting stderr to $log_stderr" echo "Redirecting stderr to $log_stderr"
exec ~/bin/sway 2>"$log_stderr" >"$log_stdout" exec ~/.local/bin/sway 2>"$log_stderr" >"$log_stdout"
fi fi

View File

@ -1,6 +1,6 @@
* { * {
border: none; border: none;
font-family: "Font Awesome 5 Free", sans-serif; font-family: "Font Awesome 5 Pro", sans-serif;
font-size: 13px; font-size: 13px;
} }

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# refresh font cache
fc-cache
# run units # run units
systemctl --user daemon-reload systemctl --user daemon-reload
systemctl --user enable --now redshift.service systemctl --user enable --now redshift.service