# How to use CJK font in Mac OS?

OS: Mac OS X 10.10

I am trying to write an article in Chinese and English. The preamble is:

\usepackage{fontspec}
\usepackage{xeCJK}
\setmainfont{Times New Roman}  % Set main font for ASCII
\setCJKmainfont[BoldFont=Heiti SC]{Songti SC}
\setCJKsansfont{Heiti SC}
\setCJKmonofont{Courier}


I use xelatex to compile the documents with xelatex article.tex, then the compiler raised two warnings:

fontspec warning: 'script-not-exist'
Font 'Songti SC' does not contain script 'CJK'.


and

fontspec warning: 'script-not-exist'
Font 'Courier' does not contain script 'CJK'.


However, the pdf document was generated and the Chinese words were displayed, except that bold Chinese characters do not work.

I changed the arguments to Songti then an error was raised. Songti SC and Heiti SC are the names I found in "Font Book" in Mac OS. I am confused by the warnings.

How do I set the CJK font correctly?

• here, I met the same issue, though my version is up to 2018 yet, any clue about this? – user179432 Jan 13 at 15:16

Here's a test using Heiti SC (Light and Medium) vs Songti SC (Light and Bold). The results are more visible in the latter.

## Code

\documentclass[margin=10pt]{standalone}
\usepackage{varwidth}
\usepackage{fontspec}
\usepackage{xeCJK}
\setmainfont{Times New Roman}
\setCJKmainfont[BoldFont=Heiti SC Medium]{Heiti SC Light} % \setCJKmainfont[BoldFont=Songti SC Bold]{Songti SC Light}
\setCJKsansfont{Heiti SC}
\setCJKmonofont{Courier}

\begin{document}
\begin{varwidth}{\linewidth}
\verb;\setCJKmainfont[BoldFont=Heiti SC Medium]{Heiti SC Light};

\Huge

\textbf{谢谢}
\end{varwidth}
\end{document}

• Thank you. I specify font type by adding Bold or Medium and it worked. But the warning still occurred. – Zelong Jun 10 '15 at 15:06
• @Zelong Which warning? – Alenanno Jun 10 '15 at 15:10
• the two warnings: fontspec warning: script-not-exist – Zelong Jun 10 '15 at 15:18
• @Zelong Is your Tex Live up to date? – Alenanno Jun 10 '15 at 15:19
• Yes, it is the 2014 and no update is available in TexLive Utility. – Zelong Jun 10 '15 at 18:40