[Resolve] Thai Fonts Display Larger Size in Ubuntu

หลายท่านที่ใช้ Ubuntu คงประสบปัญหาการเปิดเอกสารจาก Windows โดยเฉพาะจาก Microsoft Office ซึ่งใช้ฟอนต์เป็นของตัวเอง และไม่มีบนลินุกซ์ การนำฟอนต์จาก Windows มาใส่ใน Linux ตรง ๆ นั้น ผมเข้าใจว่าดิสโทรอื่น เช่น openSUSE นั้นทำได้ แต่ทำไมกับ Ubuntu พอเอามาวางปุ๊บ ขนาดมันจึงกลายเป็นหม้อข้าวหม้อแกงโรงทานไปซะงั้น !

แก้ปัญหาแบบโง่ ๆ มาก็ตั้งหลายที วันนี้ขอบันทึกวิธีที่เวิร์ก (ที่สุด ณ ขณะนี้) ไว้หน่อยแล้วกัน เพราะช่วงนี้ลง OS ใหม่บ่อยมาก เนื่องจากลองเล่น 9.04 เป็นระยะ ๆ

วิธีการนี้นำมาจาก kitty.in.th ขอบคุณไว้ ณ ที่นี้ด้วยนะครับ :-)

———————————————————————————————-

หาฟอนต์ Corada และ Angsima มาใส่ไว้ใน ~./fonts หรือที่ /usr/share/fonts ก็ได้ จากนั้นแก้ไฟล์ fonts.conf (เอาฟอนต์ไว้ที่ไหนก็แก้ไฟล์ที่นั่น ในกรณีนี้ผมเอาไว้ที่ /usr/share/fonts จึงต้องแก้ไฟล์ที่ /etc/fonts/fonts.conf

เพิ่มข้างล่างนี้เข้าไป

<!-- Synthesize Windows AngsanaUPC and Angsana New with Angsima -->
<match target="pattern">
	<test qual="any" name="family" mode="eq">
		<string>AngsanaUPC</string>
		<string>Angsana New</string>
	</test>
	<edit name="family" mode="assign" binding="same">
		<string>Angsima</string>
	</edit>
</match>

<!-- Synthesize Windows BrowalliaUPC and Browallia New with Bromlila -->
<match target="pattern">
	<test qual="any" name="family" mode="eq">
		<string>BrowalliaUPC</string>
		<string>Browallia New</string>
	</test>
	<edit name="family" mode="assign" binding="same">
		<string>Bromlila</string>
	</edit>
</match>

<!-- Synthesize Windows CordiaUPC and Cordia New with Corada -->
<match target="pattern">
	<test qual="any" name="family" mode="eq">
		<string>CordiaUPC</string>
		<string>Cordia New</string>
	</test>
	<edit name="family" mode="assign" binding="same">
		<string>Corada</string>
	</edit>
</match>

<!-- Synthesize Windows Tahoma with Lomaputta -->
<match target="pattern">
	<test qual="any" name="family" mode="eq">
		<string>Tahoma</string>
	</test>
	<edit name="family" mode="assign" binding="same">
		<string>lomaputta</string>
	</edit>
</match>

จากนั้นก็เซฟไฟล์ ผมไม่แน่ใจว่าต้องสั่งรีเฟรชฟอนต์อีกรอบหรือไม่ แต่ทำไว้ก็ไม่เสียหาย

สั่งเลย sudo fc-cache -r -v จากนั้นเปิด OO.o ทำการสร้างงาน หรือแก้ไขได้ตามสะดวก

(ต้นฉบับจะใช้ฟอนต์ Arietta และ Codetta ซึ่งไม่สามารถแสดงผลภาษาอังกฤษได้ เลยขออะแด๊บจากต้นฉบับนิดนึง)
ขอบคุณ kitty.in.th มากครับ สว่างเสียทีงานนี้ อิอิอิ

4 thoughts on “[Resolve] Thai Fonts Display Larger Size in Ubuntu

  1. มาลงความเห็นไว้ก่อน เดี๋ยวกลับมาทำตาม
    พอดีเพิ่งทำใจ switch มาใช้ ubuntu ได้

  2. i’d like to find the beautiful Thai font which we write for Wedding Card, please show all,and how to install in internet.
    Thanks,
    O/T

    p.S. Sometimes it used in writing Pra Tri Pi DoK , something like that.
    O/T

  3. i’d like to find the beautiful Thai font which we write for Wedding Card, please show all,and how to install in internet.
    Thanks,
    O/T

    p.S. Sometimes it used in writing Pra Tri Pi DoK , something like that.
    O/T

  4. @ Orapanne

    ไปหาห้อนต์ที่ชอบมาเตรียมไว้นะครับ เป็นแบบ TrueType (.ttf) ก็จะดี (ควรจะด้วยซ้ำ) สามารถหาได้ที่ http://www.f0nt.com สำหรับฟ้อนต์สวย ๆ แปลก ๆ และเอาจาก Sipa ก็ได้ในกรณีอยากได้ฟ้อนต์ลายไทยสวย ๆ

    จากนั้นเปิด Nautilus ด้วยสิทธิ root โดยการกด ALT+F2 พิมพ์ “gksu nautilus” จากนั้นคัดลอกห้อนต์ที่ต้องการทั้งหมดไปไว้ใน /usr/share/fonts จากนั้นก็ปดได้เลย รอซัก 30 วินาทีฟ้อนต์ก็จะพร้อมใช้งาน แต่ถ้ารีบก็เปิด Terminal พิมพ์ “fc-cache” เพื่อให้ระบบจัดการแคชของฟ้อนต์ทันที ก็พร้อมใช้งานกับทุกโปรแกรมแล้วครับ

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>