Skip to content

how to support Chinese in “Single HTML file for real-time previewing typst document”? #658

Answered by Myriad-Dreamin
GaoCan702 asked this question in Q&A
Discussion options

You must be logged in to vote

As the doc comments said, you can load the cjk fonts by preloadRemoteFonts.

export function preloadRemoteFonts(

And there is an cjk font assets can be loaded from GitHub.

/** @internal */
const _cjkFonts: string[] = [
'InriaSerif-Bold.ttf',
'InriaSerif-BoldItalic.ttf',
'InriaSerif-Italic.ttf',
'InriaSerif-Regular.ttf',
'Roboto-Regular.ttf',
'NotoSerifCJKsc-Regular.otf',
];

Note: considering most chinese people cannot connect the GitHub directly, you should distribute the fon…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GrooveWJH
Comment options

Answer selected by GaoCan702
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants