[Solution] How to fix Thai Google Fonts not working

Recently, Thai Google Fonts are becoming popular due to how easy it is to implement and the outstanding designs by CadsonDemak.

thai google fonts

However, if you just copy HTML / CSS code from Google Fonts website, it will not work on Thai characters on the machine without fonts installed.

วิธีการแก้ปัญหา Google Fonts ภาษาไทยไม่ทำงาน (How to fix Thai Google Fonts)

โค้ดเริ่มต้นที่เราก็อปปี้มาจะเป็นแบบนี้ (The starting code might look like this:)

<link href="https://fonts.googleapis.com/css?family=Taviraj" rel="stylesheet">

แค่เพิ่ม &subset=Thai เข้าไปด้านหลังก็พอ Just add &subset=Thai at the end of the URL:

<link href="https://fonts.googleapis.com/css?family=Taviraj&subset=thai" rel="stylesheet">

ป.ล. สำหรับวิธีใส่ Google Fonts ภาษาไทยตั้งแต่เริ่มต้น สามารถอ่านได้ที่ ฟ้อนต์ไทยสวย ๆ ใช้ฟรี 100% จาก Google Fonts และวิธีใช้งาน


Posted

in

,

by

Comments

Leave a Reply

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