By default, Firefox and Brave use Droid Sans Thai to display Thai text. I would like to change this to Noto Sans Thai and Noto Serif Thai which is installed by default as well. Looking inside /etc/fonts/conf.d
, I found 65-0-google-noto-sans-thai-vf.conf
, 65-0-google-noto-serif-thai-vf.conf
, and 69-google-droid-sans-thai-fonts.conf
. I think I have to config something inside the ~/.config/fontconfig/fonts
, but I am not sure what that is.
I tried using font-tweak-tools
, and that generated a file at ~/.config/fontconfig/conf.d/000-fontstweak-ezfc.conf
for me. Although, both browsers still default to Droid Sans Thai.
This is the content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<!--
THIS FILE WAS GENERATED BY libeasyfc 0.14.1
DO NOT EDIT THIS DIRECTLY
ANY CHANGES HAS BEEN MADE MANUALLY MAY BE LOST.
-->
<match target="pattern">
<test name="lang">
<!--lang=th-TH-->
<string>th</string>
</test>
<test name="family">
<string>Noto Sans Thai</string>
</test>
<edit name="family" mode="append_last">
<string>sans-serif</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<!--lang=th-TH-->
<string>th</string>
</test>
<test name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Sans Thai</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<!--lang=th-TH-->
<string>th</string>
</test>
<test name="family">
<string>Noto Serif Thai</string>
</test>
<edit name="family" mode="append_last">
<string>serif</string>
</edit>
</match>
<match target="pattern">
<test name="lang">
<!--lang=th-TH-->
<string>th</string>
</test>
<test name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend">
<string>Noto Serif Thai</string>
</edit>
</match>
</fontconfig>
I tried a fonts.conf
I found online and that changed my Brave default font to Noto Sans Thai, but Firefox remains the same. Even though this work partially, I do not think this is the correct way because I am not restricting it to only Thai.
This is the config:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<!-- Defaults -->
<alias>
<family>serif</family>
<prefer>
<family>Noto Serif</family>
<family>Noto Serif Thai</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Sans Thai</family>
</prefer>
</alias>
<alias>
<family>sans</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Sans Thai</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Sans Mono</family>
</prefer>
</alias>
<alias>
<family>Arial</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Sans Thai</family>
</prefer>
</alias>
</fontconfig>
For Firefox I would try to make your selves a custom CSS and select the font you like to use:
According to a previous discussion, Firefox’s website font settings are not influenced by your system settings (CJK font preference configuration).
To modify the fonts in Firefox, you can follow the guide provided by Mozilla Support Change the fonts and colors websites use.
Additionally, you may need to add the privacy.fingerprintingProtection.overrides
setting, as explained in this Mozilla Support article Websites not using user-defined default fonts.
It works on my Fedora Kinoite.
I am using Firefox with ETP strict mode and never thought that it could be the culprit. I still need to use the above fonts.conf
to make Brave use the correct font.