Closed raykr closed 2 years ago
Yes, I think there are all need fonts on my macos.
macOS Monterey 12.1 MacTex2021 VSCode with LaTex Workshop plugin
When I compile sample-master.tex
by xelatex, but error, there's 9+ errors, just like Package fontspec: The font "SimHei" cannot be found.
, Font TU/SimHei(0)/b/n/10.53937=SimHei/OT:embolden=2.17; at 10.53937pt not loadable: Metric (TFM) file or installed font not found.
, Font shape
U/rsfs/m/n' in size <22.3999> not available` and so on.
Can you help me?
I test it in a new test.tex by \documentclass{ctexart}
and type Chinese words, run well.
I change'd two lines of buaathesis.cls
like this, then it work.
\setCJKfamilyfont{songti}[AutoFakeBold = {2.17}]{STSongti-SC-Regular}
\setCJKfamilyfont{heiti}[AutoFakeBold = {2.17}]{STHeitiSC-Light}
Maybe caused by different os has different font name. On Windows it named SimSun, but STSongti-SC-Regular on macOS.
So you guys should consider how to fix this problem between different os, especially macOS.
Thanks!
@RayKr Could you help to try whether removing those \setCJKfamilyfont
commands helps to resolve the problem?
I suppose it might be better to follow the usage of ctex toolkit [1][2] rather than those old hackings.
[1] https://github.com/CTeX-org/ctex-kit [2] https://ctan.org/tex-archive/language/chinese/ctex
Removing those two \setCJKfamilyfont
lines , it also worked, but it lost the bold style.
Removing those two
\setCJKfamilyfont
lines , it also worked, but it lost the bold style.
Please try to add AutoFakeBold
in the documentclass
options as mentioned here [1]
[1] https://zhuanlan.zhihu.com/p/111368138 (the last part)
Yes, I think there are all need fonts on my macos.
current env
macOS Monterey 12.1 MacTex2021 VSCode with LaTex Workshop plugin
issue
When I compile
sample-master.tex
by xelatex, but error, there's 9+ errors, just likePackage fontspec: The font "SimHei" cannot be found.
,Font TU/SimHei(0)/b/n/10.53937=SimHei/OT:embolden=2.17; at 10.53937pt not loadable: Metric (TFM) file or installed font not found.
,Font shape
U/rsfs/m/n' in size <22.3999> not available` and so on.
Hi @RayKr 对于Mac上这个报错,按照 #307 安装SimSun和SimHei这两个字体之后可以解决。
Yes, I think there are all need fonts on my macos.
current env
macOS Monterey 12.1 MacTex2021 VSCode with LaTex Workshop plugin
issue
When I compile
sample-master.tex
by xelatex, but error, there's 9+ errors, just likePackage fontspec: The font "SimHei" cannot be found.
,Font TU/SimHei(0)/b/n/10.53937=SimHei/OT:embolden=2.17; at 10.53937pt not loadable: Metric (TFM) file or installed font not found.
,Font shape
U/rsfs/m/n' in size <22.3999> not available` and so on.Hi @RayKr 对于Mac上这个报错,按照 #307 安装SimSun和SimHei这两个字体之后可以解决。
Thanks, it's work!
Have you installed the required fonts correctly?