On Sun, Oct 25, 2015 at 12:20 PM, Goulven Guillard <lecotegougdelaforce@free.fr> wrote:
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



hm, strange. In Ubuntu 14.04:


$ ls  /usr/share/fonts/
cmap  truetype  type1  X11

and liberation is under truetype

/usr/share/fonts/truetype/liberation:

/usr/share/fonts/truetype/liberation:
LiberationMono-BoldItalic.ttf
LiberationMono-Bold.ttf
LiberationMono-Italic.ttf
LiberationMono-Regular.ttf
LiberationSans-BoldItalic.ttf
LiberationSans-Bold.ttf
LiberationSans-Italic.ttf
LiberationSansNarrow-BoldItalic.ttf
LiberationSansNarrow-Bold.ttf
LiberationSansNarrow-Italic.ttf
LiberationSansNarrow-Regular.ttf
LiberationSans-Regular.ttf
LiberationSerif-BoldItalic.ttf
LiberationSerif-Bold.ttf
LiberationSerif-Italic.ttf
LiberationSerif-Regular.ttf

what does
ls  /usr/share/fonts/liberation/LiberationSans-Regular.ttf
say ?
 
--
luigi