2

The example from font-sel.mkvi fails to load system fonts:

\definefontfamily [dejavu] [serif] [DejaVu Serif]
\definefontfamily [dejavu] [sans]  [DejaVu Sans]
\definefontfamily [dejavu] [mono]  [DejaVu Sans Mono]
\definefontfamily [dejavu] [math]  [XITS Math] [scale=1.1]

\setupbodyfont[dejavu]

\starttext
\input knuth
\stoptext

With these errors:

...
selectfont      > The requested font 'DejaVu Serif' has no files for the 'tf' alternative, Latin Modern is used instead.
selectfont      > The requested font 'DejaVu Sans' has no files for the 'tf' alternative, Latin Modern is used instead.
selectfont      > The requested font 'DejaVu Sans Mono' has no files for the 'tf' alternative, Latin Modern is used instead.
...
mkiv lua stats  > loaded fonts: 2 files: lmroman10-regular.otf, xits-math.otf
mkiv lua stats  > font engine: otf 3.029, afm 1.512, tfm 1.000, 4 instances, load time 1.252 seconds
...

Same errors for any other system fonts. So what to do?

Try running luaotfload-tool? It takes a while to create the database, but is able to access all system fonts:

$ luaotfload-tool --find='MuseJazz' -F
luaotfload | resolve : Font "MuseJazz" found!
luaotfload | resolve : Resolved file name "/usr/share/fonts/mscore/MuseJazz.ttf"

And just for good measure, again:

luaotfload-tool --update

Unfortunately, still no luck in loading the fonts:

export OSFONTDIR="/usr/share/fonts;$HOME/.local/share/fonts;/usr/local/share/fonts;$HOME/.fonts"
context test

Then I try:

context --generate

This runs, but claims to do nothing. I think because it is for single-user installations and it lacks write access to the /usr/share/tex* directories. Instead I have to run this:

mtxrun --generate

This writes to ~/.texlive2017/ but I still can't run the commands the wiki says I'm supposed to run next:

$ mtxrun --script fonts generate
mtxrun          | unknown script 'fonts.lua' or 'mtx-fonts.lua'
$ mtxrun --script fonts --list --all --pattern='*'
mtxrun          | unknown script 'fonts.lua' or 'mtx-fonts.lua'

OK, lets run anything that has a --generate option:

$ luatools --generate
mtxrun          | unknown script 'base.lua' or 'mtx-base.lua'

Nope... OK, let's switch to the root user.

$ kpsewhich texmf.cnf
/usr/share/texlive/texmf-dist/web2c/texmf.cnf

First edit texmf.cnf to replace OSFONTDIR with the value from above. Update the luaotfload-tool database as per above. Let's see if mtxrun knows about the fonts script... No. First run context --generate then mtxrun --generate. Now there is some apparent success because I can run mtxrun --script fonts generate. Unfortunately it appears the generated font database is ignorant of system fonts:

$ mtxrun --script fonts --list --all --pattern='*' | egrep -i muse | wc -l
0

Even though mtxrun --generate only modified the global /usr/share/texlive/texmf-var/ location rather than /root/*, the changes are only accessible to the root user. After switching back to the main user, I still can't run this:

$ mtxrun --script fonts generate
mtxrun          | unknown script 'fonts.lua' or 'mtx-fonts.lua'

I'm not sure what to try next.

[*] Texlive on Fedora seems to be a mix of dates and svn revisions:

  • texlive.noarch 6:2016-52.20160520.fc28
  • texlive-base.x86_64 7:20170520-41.fc28
  • texlive-collection-context.noarch 6:svn36190.0-52.20160520.fc28
  • texlive-collection-luatex.noarch 6:svn39902-52.20160520.fc28
  • texlive-context.noarch 7:20170520-41.fc28
  • texlive-luatex.x86_64 7:20170520-41.fc28
  • texlive-context-title.noarch 6:svn36189.0-52.fc28.2

closed as off-topic by Henri Menke, marmot, Stefan Pinnow, Sebastiano, TeXnician Nov 23 '18 at 9:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Henri Menke, marmot, Stefan Pinnow, Sebastiano, TeXnician
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    luaotfload is irrelevant for context. But beside this I can only suggest to install a current standalone context wiki.contextgarden.net/ConTeXt_Standalone. – Ulrike Fischer Nov 15 '18 at 18:14
  • 1
    If you are the only one to use texlive, I'd suggest a texlive vanilla install on your $HOME. It is more effective than texlive packages on Linux, and AFAIK, installation without root access are recommended since CTAN repos are not fully secured yet. A standalone ConTeXt is an alternative as suggested by Ulrike Fischer while I was typing my comment. Of course, only if you don't use LaTeX. – sztruks Nov 15 '18 at 18:14
  • 1
    The correct arguments to update the font database for ConTeXt are mtxrun --script fonts --reload. – Wolfgang Schuster Nov 15 '18 at 18:34
  • The TeX Live packaging of Fedora is notoriously garbage. See my comments on this closed question: tex.stackexchange.com/questions/450184/… – Henri Menke Nov 15 '18 at 20:03
  • Yeah this should have been a bug report rather than a question here. I'm fine with running standalone ConTeXt. – user19087 Nov 16 '18 at 0:27