Closed lhjt closed 2 months ago
The typst_ts_web_compiler_bg.wasm
is designed for web environment. We can load system fonts by overriding the fetch api as node-fetch
, but it is cumbersome.
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.
so the solution is that I have to load custom CJK-compatible fonts into this preload list?
Exactly, you will have to load all fonts for running the web compiler, but not for running the node compiler.
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 embedded_cjk_fonts
feature? I am looking forward to the typst_ts_node_compiler
but will try and get this to work for the time being as I am unsure of when it will be available.
Fantastic, thank you 🙂
I have published @myriaddreamin/typst-ts-node-compiler
0.5.0-rc5. While there is still a dependency issue in published version, you can try the compiler-node template a bit.
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?
closing in flavor of having node compiler. Please see templates/compiler-node for use.
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!