สำหรับ linux บาง version อาจจะมีปัญหาในเรื่องภาษาไทยที่แสดงผลแล้วตัวสระอยู่ไม่ถูกที่ ซึ่งปัญหานี้เกิดจากการที่ linux ตัวนั้นไม่มี fonts thai ที่สามารถแสดงผลได้อย่างถูกต้อง วิธีการแก้ไขปัญหานี้สามารถทำได้หลายวิธีด้วยกัน
- สำหรับ linux ที่สามารถใช้งาน rpm ได้ให้ download ไฟล์ msttcorefonts-1.3-4.noarch.rpm และ ใช้คำสั่ง
- copy fonts มาจาก windows ไปใส่ไว้ที่ fonts:// ในหน้าต่างของ nautilus. ดูเพิ่มเติมได้ที่
- สร้าง directory ชื่อ windows ที่ /usr/share/fonts/truetype โดยใช้คำสั่ง
[root@ezylinux ~]# mkdir /usr/share/fonts/truetype/windows
ทำการ copy fonts จาก windows มาไว้ที่ /usr/share/fonts/truetype/windows และให้เข้าไปที่ directory ที่ได้สร้างไว้โดยใช้คำสั่ง
[root@ezylinux ~]# cd /usr/share/fonts/truetype/windows
จากนั้นให้รันคำสั่งเพื่อสร้าง fonts directory สำหรับ xfs
[root@ezylinux ~]# ttmkfdir > fonts.dir
จากนั้นรันคำสั่ง
[root@ezylinux ~]# chkfontpath --add /usr/share/fonts/truetype/windows
เพื่อทำการ add fonts เข้าสู่ระบบ จากนั้นให้ทำการ restart xfs service ด้วยคำสั่ง
[root@ezylinux ~]# service xfs restart
ถ้าต้องการให้ fonts ที่เรา add เข้าไปอยู่ในลำดับการเรียกใช้ต้นๆให้เราทำการแก้ไขที่ไฟล์ /etc/X11/fs/config ในส่วนของ catalogue เช่น ทำการแก้ไขให้อยู่ลำดับแรกของการเรียกใช้งาน
catalogue = /usr/share/fonts/truetype/windows,
/usr/share/X11/fonts/misc:unscaled,
/usr/share/X11/fonts/75dpi:unscaled,
/usr/share/X11/fonts/100dpi:unscaled,
/usr/share/X11/fonts/Type1,
เท่านี้ก็เป็นอันเสร็จเรียบร้อยแล้วครับ
[root@ezylinux ~]# rpm -ivh msttcorefonts-1.3-4.noarch.rpm
Add Windows (TrueType) Fonts in GNOME desktop
Related posts:
- Add Windows (TrueType) Fonts in GNOME desktop จากบทความ Add fonts thai ใน linux กัน จะขอขยายความในข้อ...
- Extract files from an RPM package RPM (Red Hat Package Management) เป็นไฟล์ install ของทาง...
- Find Out Which RPM Installed a Specific File by rpm or yum Command การตรวจสอบว่าไฟล์หรือคำสั่งต่างๆมาจาก package ไหนบ้าง สามารถทำได้ไม่ยาก โดยจะใช้คำสั่ง rpm หรือ yum...
- Mplayer Multimedia player for Linux พักนี้มีคนถามเรื่องการใช้งานทางด้านการเล่น VCD DVD หรือ ไฟล์ที่เกี่ยวข้องกับ Multimedia กันมามาก ผมจึงอยากจะแนะนำโปรแกรมที่สามารถ...
- How to Get Flash plugin to Work on Fedora x86_64 (64-bit) เวลาใช้งาน linux version x86_64 หรือ 64-bit จะมีปัญหาว่า เวลาที่...


December 9th, 2008
Tum.
Posted in
Tags: 