[NTG-context] [fonts] Why does ConTeXt keep telling me "source file is not found" ?

2015-10-28 Thread Goulven Guillard

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
liberationmonobolditalicliberationmonobolditalic 
/usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf
liberationmonoitalicliberationmonoitalic 
/usr/share/fonts/liberation/LiberationMono-Italic.ttf
liberationmononormalliberationmono 
/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
liberationsansbolditalicliberationsansbolditalic 
/usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf
liberationsansitalicliberationsansitalic 
/usr/share/fonts/liberation/LiberationSans-Italic.ttf
liberationsansnormalliberationsans 
/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 : 

[NTG-context] What is the prefered way to load a system font ?

2015-10-28 Thread Goulven Guillard

Hi again,

I'm puzzled about the prefered way to load a system font, and I read the 
wiki is outdated.


Is \setmainfont deprecated for \definefontfamily + \setupbodyfont ?  Or 
are they different things ?


Also, how am I supposed to find the right family name to feed both with 
?  I read somewhere that the output of mtxrun (which column ?) should be 
used and not fc-list output, then I read the opposite, and I read that 
the --info option of mtxrun should provide the same family name as 
listed with most GUI software, yet I tried and it doesn't…


Thanks.

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
___

Re: [NTG-context] [fonts] Why does ConTeXt keep telling me "source file is not found" ?

2015-10-28 Thread Goulven Guillard

Le 28/10/2015 09:43, luigi scarso a écrit :

hm, strange. In Ubuntu 14.04:


FWIW, I'm using Fedora 20.



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


$ ls -l /usr/share/fonts/liberation/LiberationSans-Regular.ttf
-rw-r--r--. 1 root root 139632 28 août   2013 
/usr/share/fonts/liberation/LiberationSans-Regular.ttf


Actually it seems the issue is with kpsepath not searching fonts files 
recursively.  I tried to set OSFONTDIR="/usr/share/fonts//" (with two 
trailing slashes — I even tried more…) but it didn't help, though 
kpsewhich --var-value=OSFONTDIR gives the expected path.


I've ended linking all fonts directly in $HOME/.fonts/, but of course a 
cleaner solution would still be welcome.


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
___