Joey McCollum via ntg-context schrieb am 07.08.2021 um 22:29:
Hi,
I'm interested in packaging a ConTeXt project in a self-contained way, so that the environment/component/project .tex files, the bibliography .bib file(s), and fonts used for typesetting are all provided in one place. (The goal is that others can generate the PDFs themselves from the source files as long as they have a sufficiently recent version of ConTeXt installed.) The usual ConTeXt directory structure makes sense for most of this, but it doesn't address the possibility of accessing fonts locally. I think I could do this with a script that temporarily sets the OSFONTDIR variable to the local fonts directory and then invokes ConTeXt to typeset the project-level file, but I was wondering if there is an easier way to do this from within ConTeXt. Specifically, is there a way to specify a font via a local path with font setup commands in an environment file?
You can use \usefontpath[...] to set a directory where ConTeXt searches for fonts but this works only when you use a typescript and not for \definefontfamily. Wolfgang