Since I have started using Arch with KDE, I have faced the issue of broken Bengali text everywhere. Fixing the browsers was easy enough but for it to work on Telegram the only solution I was getting is to change the system font to a Bengali-supported font. I didn’t want to do that as it also messed up the entire English font on my computer.

I recently asked a question in a Facebook group and got the Solution.

Solution:

First, create a folder .config/fontconfig/conf.d/ in your home folder. You can do it by running this command in your terminal:

mkdir -p ~/.config/fontconfig/conf.d/

Then create a file called 90-bengali.conf . Enter the following in the file:

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

You can change the name of the font file in lines 12 and 23 to any Bengali font that you like and you are done!

This solution will probably fix other applications as well. You can also tweak this method for it to work on other languages as well.