
มีโอกาสเขียนเว็บเพจที่ใช้ font ที่เตรียมไว้
ได้ download มา 2 font แล้วเก็บไว้ในห้องหนึ่ง
ชื่อ rsp_thchakrapetch.ttf กับ rsp_alexbrush.ttf
ส่วนแฟ้ม .htm ก็อยู่ในห้องเดียวกัน
มีขั้นตอนดังนี้
1. ประกาศชื่อแฟ้มฟอนต์ และชื่อฟอนต์ที่จะใช้ภายในเว็บเพจ
2. จุดใดจะกำหนดรูปแบบฟอนต์ ก็อ้างอิงที่ประกาศได้เลย
3. ดูจากตัวอย่างก็เข้าใจได้โดยง่าย
<body>
<style>
@font-face{
font-family:THChakraPetch;
src: url(‘rsp_thchakrapetch.ttf’);
}
@font-face{
font-family:AlexBrush;
src: url(‘rsp_alexbrush.ttf’);
}
</style>
<p style=”font-family:THChakraPetch;font-size:100px;”>สวัสดี</p>
<p style=”font-family:AlexBrush;font-size:100px;”>hello</p>
<p><a href=”rsp_thchakrapetch.ttf”>rsp_thchakrapetch.ttf</a></p>
<p><a href=”rsp_alexbrush.ttf”>rsp_alexbrush.ttf</a></p>
</body>
ดาวน์โหลดฟอนต์ และ code ตัวอย่าง โดย view source ได้เลย
http://www.thaiall.com/web2/download_font.htm