#Is there a way to get the same behavior of `typst c --font-path .fonts without needing cli commands

3 messages · Page 1 of 1 (latest)

stiff hill
#

Hi, I’m building a Typst template and I want anyone who installs the package to be able to use the template and its fonts out of the box, without needing to install the fonts on their system manually or specify the .fonts folder every time they use the template.

Is there a way to bundle and load fonts directly via Typst code (for example from within lib.typ), or otherwise make the fonts automatically available when the template package is used?

└── template-name
    └── 0.1.0
        ├── assets
        │   └── logo.svg
        ├── lib.typ
        ├── template
        │   ├── main.pdf
        │   ├── main.typ
        │   └── refs.bib
        └── .fonts
            └── myfont.ttf
#set text(font: "myfont")
drowsy cloud
stiff hill
#

indeed
I am looking forward to the feature I guess 😅