2

Though Noto Sans CJK provides four versions: JP, KR, TC, and SC, and they are similiar but subtle different (see the 1st and 2nd line), I want to set all of the CJK characters to font TC, except CJK punctuation (,。「」……, etc) to font SC (as the 4th line).

I currently use preprocessing bash script to replace them by command sed; however that is just a workaround. How to change all CJK punctuation to a different font face gracefully?

In other words, how to replace all with {\punctfont。}?

% !TEX program = xetex
\documentclass{ctexart}

\setCJKmainfont[SlantedFont=Noto Sans CJK TC]{Noto Sans CJK TC}
\newCJKfontfamily\punctfont{Noto Sans CJK SC}

\begin{document}

\texttt{TC}: 角、亮、空、窗、誤。

\texttt{SC}: {\punctfont 角、亮、空、窗、誤。} \\

我能吞下玻璃,而不傷身體。

我能吞下玻璃{\punctfont,}而不傷身體{\punctfont。}   % Expectation!

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.