how to support Chinese in “Single HTML file for real-time previewing typst document”? #658
-
![]() |
Beta Was this translation helpful? Give feedback.
Answered by
Myriad-Dreamin
Mar 31, 2025
Replies: 1 comment 1 reply
-
As the doc comments said, you can load the cjk fonts by And there is an cjk font assets can be loaded from GitHub. typst.ts/packages/typst.ts/src/options.init.mts Lines 84 to 92 in 5cdaded Note: considering most chinese people cannot connect the GitHub directly, you should distribute the fonts by yourself in production. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
GaoCan702
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the doc comments said, you can load the cjk fonts by
preloadRemoteFonts
.typst.ts/packages/typst.ts/src/options.init.mts
Line 161 in 5cdaded
And there is an cjk font assets can be loaded from GitHub.
typst.ts/packages/typst.ts/src/options.init.mts
Lines 84 to 92 in 5cdaded
Note: considering most chinese people cannot connect the GitHub directly, you should distribute the fon…