ลองมาติดตั้งฟอนต์ภาษาไทยให้ แสดงผลได้สมบูรณ์ดีกว่าครับ
ติดตั้ง CentOS แล้วอ่านภาษาไทยที่แสดงผลแบบแปลกๆ ลองมาติดตั้งฟอนต์ภาษาไทยให้ แสดงผลได้สมบูรณ์ดีกว่าครับ
ขั้นตอนมีดังต่อไปนี้
1. ไปดาวน์โหลดฟอนต์มาก่อนจาก
ftp://linux.thai.net/pub/ThaiLinux/software/thai-ttf/
ณ วันที่เขียนนี้คือ thai-ttf-0.4.9.tar.gz เอาไปเก็บไว้ที่ /opt
2. แตกไฟล์โดยใช้คำสั่ง
#tar -xzf thai-ttf-0.4.9.tar.gz
จะได้ แฟ้มของฟอนต์ ชื่อ thai-ttf-0.4.9
3. ย้ายไฟล์ไปไว้ที่
/usr/share/fonts/thai-ttf
โดยใช้คำสั่งดังนี้
# mv /opt/thai-ttf-0.4.9 /usr/share/fonts/thai-tff
4. จากนั้นเพิ่มฟอนต์เข้าสู่ระบบโดยใช้คำสั่ง
# chkfontpath -a /usr/share/fonts/thai-ttf/
5. ปรับแต่งให้แสดงผลฟอนต์ได้ชัดเจน
# cd /etc/fonts/conf.d/
# wget http://ftp.opentle.org/pub/olpc-thai/SRPMS/66-ttf-thai.conf
6. log off ออกจาก graphic mode และ log in เข้ามาใหม่
-------------
หากพบข้อผิดพลาดในขั้นตอน chkfontpath -a ให้ลองใช้คำสั่ง
mkfontdir
[root@test ttfonts]# chkfontpath -a
/usr/share/fonts/ttfonts/
chkfontpath: error opening
/usr/share/fonts/ttfonts/fonts.dir, unwilling to add
path
[root@test ttfonts]# mkfontdir