Why are my Chinese characters not correctly displayed in the PDF document?

My typ code is as follows:

print("早上好")

The pdf output is as follows:
image

You’ll have to give more context because I am unable to reproduce your results.

This code:
image
produces this result in the web app:
image

Your image looks like you have print("早上好") within a code block, but that is not present in what you showed us.

1 Like

I guess you meet this issue? clreq-gap for typst

Possible solution:

#show raw: set text(font: …)
1 Like

Thank you for the link. The following code works

#let font = "Times New Roman"
// Original code
//#let fallback = false
// The following line of code is the problem
//#set text(font: font, fallback: fallback, size: 9pt, top-edge: 0.75em, lang: "en")

// New code
#set text(font: font)
print("早上好")

image