Improve Ubuntu default Sinhala rendering
Thilina wrote this .Ubuntuβs default Sinhala font LKLUGβs rendering is broken. The diacritics doesnβt appear in the correct place. Got it fixed by setting Noto Sans Sinhala as the default si font.
Before:
After:
-
Download your favourite sinhala font and add it to /usr/share/fonts/ eg: https://fonts.google.com/noto/specimen/Noto+Sans+Sinhala
-
Create ~/.config/fontconfig/conf.d/50-custom-si.conf and add below content. (Replace Noto Sans Sinhala with your downloaded font family)
<?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <test name="lang" compare="contains"> <string>si</string> </test> <alias> <family>sans-serif</family> <prefer> <family>Noto Sans Sinhala</family> </prefer> </alias> </match> <match target="font"> <test name="lang" compare="contains"> <string>si</string> </test> <alias> <family>serif</family> <prefer> <family>Noto Sans Sinhala</family> </prefer> </alias> </match> </fontconfig>
-
Re-build font cache by running fc-cache
-
Can confirm the change by running LANG=si fc-match, you will have to restart most apps to see the change.