I want where possible Droid fonts to be used. So i created ~/.fonts.conf
with this content:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Droid</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Droid</family>
</prefer>
</alias>
<alias>
<family>sans</family>
<prefer>
<family>Droid</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Liberation</family>
</prefer>
</alias>
<match target="font">
<edit mode="assign" name="rgba">
<const>none</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>hintmedium</const>
</edit>
</match>
<dir>~/.fonts</dir>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
</fontconfig>
But i get this in the console:
vic@wic:~/Documents$ fc-match sans
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
DejaVuSans.ttf: "DejaVu Sans" "Book"
I tried restarting computer, but i get the same result.
How do i force Ubuntu to use Droid fonts where possible?
Ok, i replaced 'Droid' with 'Droid Sans', 'Droid Serif', etc., and it worked:
Then i added more patterns to the file, and now fonts are replaced in browser: