% --- TestXeTeX_SetAngsana.tex-------
% --- Chakkree Tiyawongsuwan ----
%
% อ้างอิง http://markmail.org/message/ulp3lmxfg5biv7b5
%
\documentclass[12pt,a4paper]{book}
\usepackage{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\XeTeXlinebreaklocale "th"
\defaultfontfeatures{Scale=1.23}
\renewcommand{baselinestretch}{1.6}
%========================================
% สีแดงสำหรับ MikTeX บน windows และให้ลบส่วนสีน้ำเงินออก
<span style="color: #ff0000;">\fontspec[
ItalicFont={Angsana New Italic:script=thai},
BoldFont={Angsana New Bold:script=thai},
BoldItalicFont={Angsana New Bold Italic:script=thai},
]{Angsana New:script=thai}
\setmainfont{Anagsa New:script=thai}
</span>
% สีน้ำเงิน สำหรับ Texlive (ให้ลบส่วนสีแดงออก)
<span style="color: #0000ff;">\setmainfont[BoldFont={Garuda-Bold:script=thai},
ItalicFont={Garuda-Oblique:script=thai},
BoldItalicFont={Garuda-BoldOblique:script=thai}
]{Garuda:script=thai}</span>
%==================================================
\setsansfont{Angsana New:script=thai}
<span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: 19px; white-space: normal; font-size: 13px;">
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;">\setmonofont[Scale=0.8]{Tahoma:script=thai}
\begin{document}
\noindent ป้า กะ ปู่ กู้อีจู้ ตัวปกติ\
{itshape ป้า กะ ปู่ กู้อีจู้ ตัวเอียง} \
{bfseries ป้า กะ ปู่ กู้อีจู้ ตัวหนา } \
{bfseriesitshape ป้า กะ ปู่ กู้อีจู้ ตัวหนาเอียง} \
\noindent ทดสอบใช้คำสั่ง LaTeXe{}\
ป้า กะ ปู่ กู้อีจู้ ตัวปกติ\
\textbf{ป้า กะ ปู่ กู้อีจู้ ตัวหนา}\
\textit{ป้า กะ ปู่ กู้อีจู้ ตัวเอียง}\
\textsl{ป้า กะ ปู่ กู้อีจู้ ตัวเอน}\
\textbf{textit{ป้า กะ ปู่ กู้อีจู้ ตัวหนาเอียง}}\
\texttt{ป้า กะ ปู่ กู้อีจู้ ตัวพิมพ์}\
\noindent The quick brown fox jumps over the lazy dog\
\textbf{The quick brown fox jumps over the lazy dog}\
\textit{The quick brown fox jumps over the lazy dog}\
\textsl{The quick brown fox jumps over the lazy dog}\
\textbf{textit{The quick brown fox jumps over the lazy dog}}\
\texttt{The quick brown fox jumps over the lazy dog}\
end{document}