Ubuntu – Change Default Persian Font

fonts

I am using Ubuntu 16.04 LTS and I want to change its default Persian font because I think it looks bad. And I don't want to change the default English font. Is this possible? If it is, how should I do this?

Best Answer

  1. Create a config file for the font in the following path:

    $HOME/.config/fontconfig/fonts.conf
    

    and add these lines to it:

    <?xml version='1.0'?>
    <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
    <fontconfig>
    
     <match>
      <edit mode="prepend" name="family">
       <string>Vazir</string>
      </edit>
     </match>
    
     <dir>~/.local/share/fonts</dir>
     <dir>/usr/share/fonts/</dir>
    
    </fontconfig>
    

    I used Vazir font, if you want to use another font(e.g. Tahoma) you must change the <string>Vazir</string> to <string>Tahoma</string>.

  2. Place your font in ~/.local/share/fonts.

Related Question