设置后备字体,而不必声明每个缺失的字符

设置后备字体,而不必声明每个缺失的字符

我的序言中有以下代码来处理 CJKmainfont 中缺少的 unicode 字符。

% Set Font.
\setsansfont{Noto Sans}
\setmainfont{Noto Serif} % Set serifed font to Calibri. Originally set to 'Times New Roman', but it cannot display certain characters such as ①②③.

\setCJKmainfont{Noto Serif CJK TC}
\setCJKsansfont{Noto Sans CJK TC} % Set Chinese font. NOTE: Remember to append CJK before of the font class. CJK HAS to be there for the font to show.
\setCJKmonofont{Noto Sans Mono TC}

% Set fallback fonts for ㊀ characters.

\newunicodechar{㊀}{{\ttfamily ㊀}}
\newunicodechar{㊁}{{\ttfamily ㊁}}
\newunicodechar{㊂}{{\ttfamily ㊂}}
\newunicodechar{㊃}{{\ttfamily ㊃}}
\newunicodechar{㊄}{{\ttfamily ㊄}}
\newunicodechar{㊅}{{\ttfamily ㊅}}
\newunicodechar{㊆}{{\ttfamily ㊆}}
\newunicodechar{㊇}{{\ttfamily ㊇}}
\newunicodechar{㊈}{{\ttfamily ㊈}}
\newunicodechar{㊉}{{\ttfamily ㊉}}
\newunicodechar{・}{{\ttfamily ・}}

% Rare Characters

\newCJKfontfamily\rarechar{HanaMinB}
\newunicodechar{

相关内容