astro-typst icon indicating copy to clipboard operation
astro-typst copied to clipboard

Example of how to add fonts.

Open syrkis opened this issue 5 months ago • 1 comments

Say I have som .tff files with some fonts. Where do I put them in my repo and how do I manke them available to Astro-typst during build (on for example Netlify)

syrkis avatar Sep 17 '25 12:09 syrkis

For a quick reply: there has been an example config in README, see https://github.com/OverflowCat/astro-typst/blob/f213f754eead454dfb1fd741d668a4b1f1c35123/README.md?plain=1#L75 They need to be in config as there is no way to add fonts after the compiler inits. And for CI, I think you need to manually download the fonts to fontPaths. You can write a .sh and invoke it in npm build scripts.

I use GitHub actions myself, however, so I directly add fonts to system without setting fontArgs. If you do not want to mess up with custom fonts, I recommend this way. Check https://github.com/OverflowCat/blog/blob/src/.github/workflows/pages.yml#L31

Am Mi., 17. Sept. 2025 um 20:38 Uhr schrieb Noah Syrkis @.***>:

syrkis created an issue (OverflowCat/astro-typst#32)

Say I have som .tff files with some fonts. Where do I put them in my repo and how do I manke them available to Astro-typst during build (on for example Netlify)

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

OverflowCat avatar Sep 18 '25 14:09 OverflowCat