我试图simsun
在 overleaf 上使用中文字体。但是它给出了一个错误。
首先,我尝试了这个解决方案,但它不起作用。
\setCJKfamilyfont{zhsong}[AutoFakeBold = {4.27}]{SimSun}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
我也使用KaiTi
效果很好的字体。
\setCJKfamilyfont{zhkai}[AutoFakeBold = {4.27}]{KaiTi}
\renewcommand*{\kaishu}{\CJKfamily{zhkai}}
然后我在下页找到了一份 CJK 中文字体列表,https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F#Chinese
然后我SimSun.ttf
在 Overleaf 中上传并从上传的字体中导入。
\setCJKmainfont{zhsong}[AutoFakeBold = {4.27}]{SimSun.ttf}
\renewcommand*{\songti}{\CJKfamily{zhsong}}
但我收到了这些错误:
Package fontspec Error: The font "zhsong" cannot be found.
./thesis.cls, 160
For immediate help type H <return>.
...
l.160 ...JKmainfont{zhsong}[AutoFakeBold = {4.27}]{SimSun.ttf}
A font might not be found for many reasons.
Check the spelling, where the font is installed, etc. etc.