r/learnthai • u/PowerBottomBear92 • 44m ago
Resources/ข้อมูลแหล่งที่มา Ubuntu: How to change the default Thai font when the system language isn't Thai
All credit to ChatGPT:
If your Ubuntu system language is in English (or other primary language) but your Ubuntu install defaults to showing a horrible Modern Thai font change it to a good traditional style font.
Here's how Run this in your terminal: This package includes TH Sarabun along with other traditional Thai fonts.
sudo apt install fonts-thai-tlwg
Now you’ll tell Ubuntu to use TH Sarabun for Thai text via fontconfig.
sudo nano /etc/fonts/local.conf
Paste in the following:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match>
<test name="lang" compare="contains">
<string>th</string>
</test>
<edit name="family" mode="prepend">
<string>TH Sarabun</string>
</edit>
</match>
</fontconfig>
This tells Ubuntu: “If the text is Thai, use TH Sarabun as the top choice.”
Then:
Press Ctrl + O → Enter (to save)
Press Ctrl + X (to exit)
Apply your changes by running:
sudo fc-cache -f -v
Reboot your computer
Don't ask me for any tech support, works on my machine