Skip to content

Unable to get correct variants of macOS's Chinese fonts Kaiti SC and Kaiti TC #4532

@duskmoon314

Description

@duskmoon314

Description

macOS has two Chinese fonts, Kaiti SC and Kaiti TC. They both have three variants: regular, bold, and black.

I can use these variants in Word, but typst renders them the same:

#text("测试", font: "Kaiti SC", weight: "regular")
#text("测试", font: "Kaiti SC", weight: "bold")
#text("测试", font: "Kaiti SC", weight: "black")
image

And the expected result should be like Word:

image

So I wonder why this happens and print what fonts typst is using:

$ typst fonts --variants | rg Kaiti -A 5
Kaiti SC
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
Kaiti TC
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
Kannada MN
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)

Three Normal styles with the same weight? This seems incorrect! I also tried other fonts like Heiti SC/TC and they seem correct:

$ typst fonts --variants | rg Heiti -A 5
Heiti SC
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 300, Stretch: FontStretch(1000)
Heiti TC
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 300, Stretch: FontStretch(1000)
Helvetica
- Style: Normal, Weight: 400, Stretch: FontStretch(1000)
- Style: Normal, Weight: 700, Stretch: FontStretch(1000)

My environment:

  • macOS: 14.5 (23F79)
  • typst: 0.11.1

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtextRelated to the text category, which is all about text handling, shaping, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions