[Tex/LaTex] How to use CJK font in Mac OS

cjkxecjkxetex

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?

Best Answer

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

Outputs

figure 1


figure 2

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}