Seems like flatpak
apps don't seem to pick up fontconfig files, so replacing them with native deb
packages will sort out the problem. However, oftentimes on new installations the font order mess up, so I made a conf
file which makes specified font (Lohit Devanagari
in this case) default for Hindi, and also puts some fallback fonts for your system when you don't want Lohit Devanagari
to become default font for English SSA subtitles:
mkdir -p /.config/fontconfig/conf.d/ && gedit /.config/fontconfig/conf.d/10-hindi.conf
and paste the following:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test compare="contains" name="lang">
<string>hi</string>
</test>
<edit mode="prepend" name="family">
<string>Lohit Devanagari</string>
</edit>
</match>
<alias>
<family>sans-serif</family>
<prefer>
<family>Ubuntu</family>
<family>Noto Sans Devanagari</family>
<family>Lohit Devanagari</family>
<family>Mukta</family>
<family>Arial Unicode MS</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>DejaVu Serif</family>
<family>Liberation Serif</family>
<family>Noto Serif Devanagari</family>
<family>Lohit Devanagari</family>
<family>Arial Unicode MS</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Ubuntu mono</family>
<family>Noto Sans Mono</family>
<family>DejaVu Sans Mono</family>
<family>Liberation Mono</family>
<family>Noto Sans Devanagari</family>
<family>Lohit Devanagari</family>
<family>Arial Unicode MS</family>
</prefer>
</alias>
</fontconfig>