Improve font rendering

This commit is contained in:
Anthony Rose 2021-09-27 22:32:36 +01:00
parent 77339bd1b5
commit ab50ce6a7f
3 changed files with 124 additions and 83 deletions

View file

@ -1,85 +1,118 @@
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- https://wiki.archlinux.org/title/font_configuration -->
<fontconfig>
<!-- Smooth fonts. -->
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="autohint">
<bool>false</bool>
</edit>
</match>
<!-- Assign the basic serif, sans-serif, and monospace font families. -->
<match target="pattern">
<test qual="any" name="family">
<string>serif</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Serif</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Sans</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>monospace</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Mono</string>
</edit>
</match>
<!-- Substitute basic PostScript fonts with better looking ones. -->
<match target="pattern">
<test qual="any" name="family">
<string>Times</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Serif</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Helvetica</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Sans</string>
</edit>
</match>
<match target="pattern">
<test qual="any" name="family">
<string>Courier</string>
</test>
<edit mode="assign" name="family">
<string>Liberation Mono</string>
</edit>
</match>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
</match>
<match target="font">
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
</match>
<selectfont>
<rejectfont>
<pattern>
<patelt name="scalable">
<bool>false</bool>
</patelt>
</pattern>
</rejectfont>
</selectfont>
<alias>
<family>serif</family>
<prefer>
<family>DejaVu Serif</family>
<family>Bitstream Vera Serif</family>
<family>Times New Roman</family>
<family>Thorndale AMT</family>
<family>Luxi Serif</family>
<family>Nimbus Roman No9 L</family>
<family>Nimbus Roman</family>
<family>Times</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>DejaVu Sans</family>
<family>Bitstream Vera Sans</family>
<family>Verdana</family>
<family>Arial</family>
<family>Albany AMT</family>
<family>Luxi Sans</family>
<family>Nimbus Sans L</family>
<family>Nimbus Sans</family>
<family>Helvetica</family>
<family>Lucida Sans Unicode</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>DejaVu Sans Mono</family>
<family>Bitstream Vera Sans Mono</family>
<family>Inconsolata</family>
<family>Andale Mono</family>
<family>Courier New</family>
<family>Cumberland AMT</family>
<family>Luxi Mono</family>
<family>Nimbus Mono L</family>
<family>Nimbus Mono</family>
<family>Nimbus Mono PS</family>
<family>Courier</family>
</prefer>
</alias>
<alias>
<family>fantasy</family>
<prefer>
<family>Impact</family>
<family>Copperplate Gothic Std</family>
<family>Cooper Std</family>
<family>Bauhaus Std</family>
</prefer>
</alias>
<alias>
<family>cursive</family>
<prefer>
<family>ITC Zapf Chancery Std</family>
<family>Zapfino</family>
<family>Comic Sans MS</family>
</prefer>
</alias>
</fontconfig>

View file

@ -29,3 +29,7 @@
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.local/share/fonts"
state: directory
- name: Create ~/.config/fontconfig directory
ansible.builtin.file:
path: "{{ ansible_env.HOME }}/.config/fontconfig"
state: directory

View file

@ -49,3 +49,7 @@
ansible.builtin.copy:
src: "xbindkeysrc"
dest: "{{ ansible_env.HOME }}/.xbindkeysrc"
- name: Copy fonts.conf
ansible.builtin.copy:
src: "fonts.conf"
dest: "{{ ansible_env.HOME }}/.config/fontconfig/fonts.conf"