Fix ugly Tamil Font in Elementary OS

If you ever encounter ugly Tamil fonts in Elementary OS or other Ubuntu based distros, the following method will help in fixing it.

If you ever encounter ugly Tamil fonts in Elementary OS or other Ubuntu based distros, the following method will help in fixing it.

Create a file called 90-tamil.conf in the folder ~/.config/fontconfig/conf.d. If the folder doesnt exists, create it.

In the file add the following code and save the file. The following code uses Noto Serif Tamil as Serif font and Noto Sans Tamil as sans font. Change the tamil font as your liking.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="pattern">
        <test name="lang" compare="contains">
            <string>ta</string>
        </test>
        <test qual="any" name="family">
            <string>sans-serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Sans Tamil</string>
        </edit>
    </match>
    <match target="pattern">
        <test name="lang" compare="contains">
            <string>ta</string>
        </test>
        <test qual="any" name="family">
            <string>serif</string>
        </test>
        <edit name="family" mode="prepend" binding="strong">
            <string>Noto Serif Tamil</string>
        </edit>
    </match>
</fontconfig>

After adding it, run the following in Terminal to see the system is picking the font properly.

LANG=ta_IN fc-match

For, me its shows some thing like this:

After adding these, the fonts in the entire OS should look like this(not only in the browser).