Git Product home page Git Product logo

Comments (9)

sighingnow avatar sighingnow commented on June 29, 2024

Have you installed the required fonts correctly?

from buaathesis.

RayKr avatar RayKr commented on June 29, 2024

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 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.

figure

image
Can you help me?

from buaathesis.

RayKr avatar RayKr commented on June 29, 2024

I test it in a new test.tex by \documentclass{ctexart} and type Chinese words, run well.
image

from buaathesis.

RayKr avatar RayKr commented on June 29, 2024

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!

from buaathesis.

huxuan avatar huxuan commented on June 29, 2024

@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

from buaathesis.

RayKr avatar RayKr commented on June 29, 2024

Removing those two \setCJKfamilyfont lines , it also worked, but it lost the bold style.

from buaathesis.

huxuan avatar huxuan commented on June 29, 2024

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)

from buaathesis.

sighingnow avatar sighingnow commented on June 29, 2024

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 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.

Hi @RayKr 对于Mac上这个报错,按照 #307 安装SimSun和SimHei这两个字体之后可以解决。

from buaathesis.

RayKr avatar RayKr commented on June 29, 2024

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 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.

Hi @RayKr 对于Mac上这个报错,按照 #307 安装SimSun和SimHei这两个字体之后可以解决。

Thanks, it's work!

from buaathesis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.