How to get better font clarity

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

How to get better font clarity

Postby hakerdefo » Aug 10th, '21, 04:10

This tip will give you improved font quality and clarity. The improvement in font rendering and quality will be most visible in browser like Firefox.
First you'll have to install following fonts,

Code: Select all
fonts-ttf-dejavu
google-croscore-arimo-fonts
google-croscore-cousine-fonts
google-croscore-symbolneu-fonts
google-croscore-tinos-fonts
google-crosextra-caladea-fonts
google-crosextra-carlito-fonts


Next there is a hidden directory in your $HOME directory called .config. In .config directory you need to create a directory with the name fontconfig
Next create a new empty file in that fontconfig directory with the name fonts.conf
Open that file $HOME/.config/fontconfig/fonts.conf in your favourite text editor and paste the following code snippet in it,

Code: Select all
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
    <match target="font">
        <edit mode="assign" name="antialias">
            <bool>true</bool>
        </edit>
        <edit mode="assign" name="embeddedbitmap">
            <bool>false</bool>
        </edit>
        <edit mode="assign" name="hinting">
            <bool>true</bool>
        </edit>
        <edit mode="assign" name="hintstyle">
            <const>hintslight</const>
        </edit>
        <edit mode="assign" name="lcdfilter">
            <const>lcddefault</const>
        </edit>
        <edit mode="assign" name="rgba">
            <const>rgb</const>
        </edit>
    </match>

    <alias>
        <family>serif</family>
        <prefer>
            <family>DejaVu Serif Book</family>
        </prefer>
    </alias>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>DejaVu Sans Book</family>
        </prefer>
    </alias>
    <alias>
        <family>sans</family>
        <prefer>
            <family>DejaVu Sans Book</family>
        </prefer>
    </alias>
    <alias>
        <family>monospace</family>
        <prefer>
            <family>DejaVu Sans Mono Book</family>
        </prefer>
    </alias>

    <match>
        <test name="family">
            <string>Arial</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Arimo</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Helvetica</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Arimo</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Times</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Tinos</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Times New Roman</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Tinos</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Courier</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Cousine</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Courier New</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Cousine</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Calibri</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Carlito</string>
        </edit>
    </match>
    <match>
        <test name="family">
            <string>Cambria</string>
        </test>
        <edit name="family" mode="assign" binding="strong">
            <string>Caladea</string>
        </edit>
    </match>
</fontconfig>


Save the file.
Open terminal and run this command,

Code: Select all
fc-cache -f


That's it. Enjoy the improved font rendering :)
Tested on Mageia, several other GNU/Linux distros and NetBSD.
My GitHub repositories,
https://github.com/hakerdefo
User avatar
hakerdefo
 
Posts: 13
Joined: Aug 9th, '21, 03:10
Location: mageia

Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest

cron