
Note: เปลี่ยนฟ้อนต์ระบบภาษาไทยใน Linux (Kubuntu)
จดไว้กันลืม ตอนนี้ใช้ Kubuntu 20.04 อยู่ครับ ต้องการเปลี่ยน Default Thai font ที่โดนเอาไปใช้ในเว็บและโปรแกรมต่าง ๆ (System font) วิธีคือให้ไปแก้ไขไฟล์ fonts.conf ที่ ~.config/fontconfig/fonts.conf จากนั้นให้เพิ่ม matcher ของภาษาไทยตามตัวอย่างด้านล่างครับ เพิ่มลงไปใน <fontconfig></fontconfig> <match> <test compare="contains" name="lang"> <string>th</string> </test> <test name="family"> <string>sans-serif</string> </test> <edit mode="prepend" name="family"> <string>Noto Sans Thai UI</string> </edit> </match> <match> <test compare="contains" name="lang"> <string>th</string> </test> <test name="family"> <string>serif</string> </test> <edit mode="prepend" name="family"> <string>Waree</string> </edit> </match> อธิบายสองส่วนใหญ่ ๆ ได้ดังนี้ครับ <match> <test compare="contains" name="lang"> <string>th</string> </test> <test name="family"> <string>sans-serif</string> </test> <edit mode="prepend" name="family"> <string>Noto Sans Thai UI</string> </edit> </match> โค้ดดังกล่าวหมายถึง หากระบบต้องการใช้ฟ้อนต์สำหรับภาษาไทยที่เป็น sans-serif ให้หยิบ Noto Sans Thai UI ไปใช้ครับ ...








