Hi,

I can't seem to make ConTeXt work with system fonts. Let's take this simple example :

---------------------------------------------------------------------
\usemodule[simplefonts][size=12pt]
\setmainfont[liberationsans]
\starttext
Test text
\stoptext
---------------------------------------------------------------------

It won't compile :

---------------------------------------------------------------------
$ context aa.tex

mtx-context | run 1: luatex --fmt="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="aa" --lua="/opt/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./aa" --c:input="./aa" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.81.0 (TeX Live 2016/dev) (rev 5350)
 \write18 enabled.

system          > callbacks > not registering frozen 'find_format_file'
open source > 1 > 1 > /opt/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

ConTeXt ver: 2015.10.09 21:28 MKIV beta fmt: 2015.10.21 int: english/english

system          > 'cont-new.mkiv' loaded
open source > 2 > 2 > /opt/context/tex/texmf-context/tex/context/base/cont-new.mkiv close source > 2 > 2 > /opt/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > files > jobname 'aa', input './aa', result 'aa'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > 2 > 3 > /data/LédiFrance/catalogues/automatic/aa.tex
resolvers       > modules > 'simplefonts' is loaded
open source > 3 > 4 > /opt/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv
loading         > ConTeXt User Module / Simplefonts
resolvers > lua > loading file '/opt/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.lua' succeeded close source > 3 > 4 > /opt/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv fonts > defining > source file 'LiberationSans-Regular.ttf' is not found backend > xmp > using file '/opt/context/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1
close source    > 2 > 4 > /data/LédiFrance/catalogues/automatic/aa.tex
close source > 1 > 4 > /opt/context/tex/texmf-context/tex/context/base/cont-yes.mkiv

!LuaTeX error: cannot find OpenType font file for reading ()
 ==> Fatal error occurred, no output PDF file produced!

mtx-context     | fatal error: return code: 1
---------------------------------------------------------------------

If I understand correctly, it fails on `defining > source file 'LiberationSans-Regular.ttf' is not found`. Yet said file is found by `mtx-run` (and has read access for all) :

---------------------------------------------------------------------
$ mtxrun --script fonts --list --all --pattern=Liberation

liberationmono liberationmono /usr/share/fonts/liberation/LiberationMono-Regular.ttf liberationmonobold liberationmonobold /usr/share/fonts/liberation/LiberationMono-Bold.ttf liberationmonobolditalic liberationmonobolditalic /usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf liberationmonoitalic liberationmonoitalic /usr/share/fonts/liberation/LiberationMono-Italic.ttf liberationmononormal liberationmono /usr/share/fonts/liberation/LiberationMono-Regular.ttf liberationmonoregular liberationmono /usr/share/fonts/liberation/LiberationMono-Regular.ttf liberationsans liberationsans /usr/share/fonts/liberation/LiberationSans-Regular.ttf liberationsansbold liberationsansbold /usr/share/fonts/liberation/LiberationSans-Bold.ttf liberationsansbolditalic liberationsansbolditalic /usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf liberationsansitalic liberationsansitalic /usr/share/fonts/liberation/LiberationSans-Italic.ttf liberationsansnormal liberationsans /usr/share/fonts/liberation/LiberationSans-Regular.ttf liberationsansregular liberationsans /usr/share/fonts/liberation/LiberationSans-Regular.ttf liberationserif liberationserif /usr/share/fonts/liberation/LiberationSerif-Regular.ttf liberationserifbold liberationserifbold /usr/share/fonts/liberation/LiberationSerif-Bold.ttf liberationserifbolditalic liberationserifbolditalic /usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf liberationserifitalic liberationserifitalic /usr/share/fonts/liberation/LiberationSerif-Italic.ttf liberationserifnormal liberationserif /usr/share/fonts/liberation/LiberationSerif-Regular.ttf liberationserifregular liberationserif /usr/share/fonts/liberation/LiberationSerif-Regular.ttf
---------------------------------------------------------------------

I asked this question here : http://tex.stackexchange.com/questions/274582/why-does-context-keep-telling-me-source-file-is-not-found/274818

I got a reply suggesting that font management had changed and that this sample should work :

---------------------------------------------------------------------
\definefontfamily [test] [sans] [Liberation Sans]
\setupbodyfont [test,ss,12pt]
\starttext
Test text
\stoptext
---------------------------------------------------------------------

However this lead to exactly the same error as the previous sample.

What am I missing ?

Regards,

Goulven.

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to