Adding Noto Sans Sinhala as the system default Sinhala font on Arch linux

126 views
Skip to first unread message

Prasad Lakmal

unread,
Mar 21, 2022, 1:18:20 AM3/21/22
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
Hello,
I'm trying to change the LKLUG Sinhala font to Noto Sans Sinhala because LKLUG is a bit outdated and difficult to read web content with that font. I tried messing around with the user font config file ($HOME/.config/fontconfig/fonts.conf) but no luck. It does apply the font but partially. For example, when I browse the web, part of the content is rendered in LKLUG some parts in Noto Sans Sinhala. I would like to know a way to fix this if anyone knows.

This is the content of my $HOME/.config/fontconfig/fonts.conf file. 

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

Supun Sudaraka

unread,
Mar 21, 2022, 2:51:10 AM3/21/22
to sinhala...@googlegroups.com

--
සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group.
මෙම සමූහයට විද්‍යුත් තැපැල් පණිවුඩයක් එවීමට: Sinhala...@googlegroups.com
දායකත්වයෙන් ඉවත්වීමට මෙම ලිපිනයට ලියන්න: Sinhala-Unico...@googlegroups.com
වෙනත් විකල්ප සඳහා සමූහය වෙත එන්න: http://groups.google.com/group/Sinhala-Unicode?hl=si
If you have trouble reading Sinhala Fonts, please visit http://si.wikipedia.org/wiki/Wikipedia:Sinhala_font for instructions.
---
You received this message because you are subscribed to the Google Groups "සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sinhala-unico...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sinhala-unicode/2841b9dc-ca5f-4bf0-b62a-ecf80c83d490n%40googlegroups.com.

Prasad Lakmal

unread,
Mar 22, 2022, 1:28:41 AM3/22/22
to සිංහල යුනිකෝඩ් සමූහය - Sinhala Unicode Group
Thanks, Got this fixed by updating the font configuration file as below. 


<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Fallback fonts preference order -->
<alias>
 <family>sans-serif</family>
 <prefer>
  <family>Noto Sans</family>
  <family>Open Sans</family>
  <family>Droid Sans</family>
  <family>Roboto</family>
  <family>Tholoth</family>
  <family>Noto Sans Sinhala</family>
 </prefer>
</alias>
<alias>
 <family>serif</family>
 <prefer>
  <family>Noto Serif</family>
  <family>Droid Serif</family>
  <family>Roboto Slab</family>
  <family>Tholoth</family>
  <family>Noto Sans Sinhala</family>
 </prefer>
</alias>
<alias>
 <family>monospace</family>
 <prefer>
  <family>Noto Sans Mono</family>
  <family>Inconsolata</family>
  <family>Droid Sans Mono</family>
  <family>Roboto Mono</family>
 </prefer>
</alias>
<match target="pattern">
 <test name="lang" compare="contains">
  <string>si</string>
 </test>
 <edit name="family" mode="prepend" binding="strong">
  <string>Noto Sans Sinhala</string>
 </edit>
</match>
<dir>~/.fonts</dir>
</fontconfig>


Supun Sudaraka

unread,
Mar 22, 2022, 1:48:24 AM3/22/22
to sinhala...@googlegroups.com
Nice. Thank you for sharing the answer.

Reply all
Reply to author
Forward
0 new messages