According to Section 2.3 of the fontspec documentation it is possible to select a font by creating a file like ⟨fontname⟩.fontspec. Does this file always has to be in the root of the document or could I somehow set a path?

So my setup currently looks like this:

├── fonts/
│   ├── scala/
│   └── scala sans/
├── main.tex
├── scala.fontspec
└── scalasans.fontspec

which works fine. But I would prefer it like this:

├── fonts/
│   ├── scala/
│   ├── scala.fontspec
│   ├── scala sans/
│   └── scalasans.fontspec
└── main.tex

Is this possible?


I came across this exact problem today. Unfortunately, you'll have to keep your fontname.fontspec file either in the current working directory, or a standard texmf location. The font directory or some subdirectory will not do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.