2
\documentclass[12pt,a4paper]{article}
\usepackage{fontspec}
\newfontfamily\englishfont{CMU Serif} % English font
\newfontfamily\thaifont[Script=Thai]{TH Sarabun New} % Thai font
\usepackage{polyglossia}
\setdefaultlanguage{thai}
\setotherlanguage{english}
\XeTeXlinebreaklocale "th_TH"

\begin{document}
\section{ทดสอบ \englishfont{test}}
ว่างเปล่า empty0 \englishfont{empty1}
\end{document}

This code builds

enter image description here

Is there any way to use CMU Serif font for the section number without changing \setdefaultlanguage because most of the document is still written in Thai but I only want to change the font for numbers.

I also know that ucharclass package can do this but it is a bit outdated and doesn't have maintainer anymore.

henryflower
  • 613
  • 1
  • 4
  • 11
Ken
  • 143

0 Answers0