I would like to use my own local fonts in my ConTeXt documents. They are stored in /usr/local/share/fonts/
like so:
├── cooper
│ ├── Cooper-BlackItalic.otf
│ ├── ...
├── Vollkorn
│ ├── Vollkorn-BlackItalic.otf
│ ├── ...
├── ...
I've followed the instructions given in the "Use the fonts you want" page of the ConTeXt Garden, namely:
Set the
OSFONTDIR
environment variable to my font folder path:$ export OSFONTDIR=/usr/local/share/fonts
Run the following commands:
$ mtxrun --generate
$ mtxrun --script fonts --reload
Even after that, running
mtxrun --script fonts --list --all --pattern='*cooper*'
returns nothing. Trying to use them in a document also causes it to fallback to the default Latin Modern font. What am I doing wrong?
I've installed ConTeXt via texlive 2024, the following versions:
$ context --version
mtx-context | ConTeXt Process Management 1.06
mtx-context |
mtx-context | main context file: /usr/local/texlive/2024/texmf-dist/tex/context/base/mkiv/context.mkiv
mtx-context | current version: 2024.02.27 09:18
mtx-context | main context file: /usr/local/texlive/2024/texmf-dist/tex/context/base/mkxl/context.mkxl
mtx-context | current version: 2024.02.27 09:18
$ mtxrun --version
mtxrun | ConTeXt TDS Runner Tool 1.32
mtxrun | source path
Update:
I can see the fonts from my $OSFONTDIR
listed in the names.tma
file, located in ~/.texlive2024/texmf-var/luametatex-cache/context/<random chars>/fonts/data/
. But still they don't get listed by mtxrun --script fonts --list --all
.