-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to load CJK fonts into server-side (non-cli) #548
Comments
The You can wait for the typst_ts_node_compiler |
I authored a previous issue (#514) and you expressed a technique here - so the solution is that I have to load custom CJK-compatible fonts into this preload list? |
Ah, I didn't notice you had opened a same issue.
Exactly, you will have to load all fonts for running the web compiler, but not for running the node compiler. |
Alright, thanks! Do you use specific fonts for the |
They are listed here: typst.ts/packages/typst.ts/src/options.init.mts Lines 62 to 87 in 4f8b145
|
Fantastic, thank you 🙂 |
I have published yarn add @myriaddreamin/typst-ts-node-compiler Since there is a dependency bug, you must install the native packages manually, which will be fixed in the next version. // for darwin arm64
yarn add @myriaddreamin/typst-ts-node-compiler-darwin-arm64
// for linux arm64
yarn add @myriaddreamin/typst-ts-node-compiler-linux-arm64-gnu
// for linux arm64
yarn add @myriaddreamin/typst-ts-node-compiler-linux-arm64-musl
// for win32 arm64
yarn add @myriaddreamin/typst-ts-node-compiler-win32-arm64-msvc
// for darwin x64
yarn add @myriaddreamin/typst-ts-node-compiler-darwin-x64
// for win32 x64
yarn add @myriaddreamin/typst-ts-node-compiler-win32-x64-msvc
// for linux x64
yarn add @myriaddreamin/typst-ts-node-compiler-linux-x64-gnu
// for linux x64
yarn add @myriaddreamin/typst-ts-node-compiler-linux-x64-musl
// for freebsd x64
yarn add @myriaddreamin/typst-ts-node-compiler-freebsd-x64
// for win32 ia32
yarn add @myriaddreamin/typst-ts-node-compiler-win32-ia32-msvc
// for linux arm
yarn add @myriaddreamin/typst-ts-node-compiler-linux-arm-gnueabihf
// for linux riscv64
yarn add @myriaddreamin/typst-ts-node-compiler-linux-riscv64-gnu But I'll review all of public APIs before publishing 0.5.0-rc6 or the stable version 0.5.0. |
Thanks for releasing this - I will have a look at your documentation to see if I can get it to work. Do you plan on pushing a multiarch package that will automatically download the current architecture for the machine under one dependency? |
Is your feature request related to a problem? Please describe.
Hello - I have been using this library for a few months and have been very happy with it; thanks for your contribution!
However, I have run into a recent issue where trying to render CJK fonts with
leads to squares in my PDF document:
Describe the solution you'd like
I noticed in another issue that the CLI has a "feature" called
embedded_cjk_fonts
- is it possible to enable this feature via the$typst
export fromimport { $typst } from "@myriaddreamin/typst.ts/dist/esm/contrib/snippet.mjs";
?Additional context
Calling typst like so:
Thanks!
The text was updated successfully, but these errors were encountered: