举个我设置的思源字体的例子,建议多看看 xeCJK 说明:
\setCJKmainfont{Source Han Serif CN}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]
\setCJKsansfont{Noto Sans CJK SC}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]
\setCJKmonofont{Noto Sans Mono CJK SC}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
AutoFakeSlant = 0.2
]
\setCJKfamilyfont{zhsong}{Source Han Serif CN}
[
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Regular,
BoldItalicFont = *-Bold
]