Hi,
I am having some trouble getting the mathdesign charter font to work.
Minimal example x.tex:
\loadtypescriptfile[mathdesign]
\setupbodyfont[charter]
\starttext
Foo
\stoptext
I tried the context that comes with Debian unstable, but that one segfaulted[1].
So I tried the standalone version, but that one can't find the math fonts:
$ context x.tex
mtx-context | run 1: luatex --fmt="/home/edwin/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en" --jobname="x" --lua="/home/edwin/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./x.tex" --c:input="./x.tex" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/dev) (rev 4972)
\write18 enabled.
open source > 1 > 1 > /home/edwin/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2014.07.30 10:31 MKIV beta fmt: 2014.8.15 int: english/english
system > 'cont-new.mkiv' loaded
open source > 2 > 2 > /home/edwin/context/tex/texmf-context/tex/context/base/cont-new.mkiv
close source > 2 > 2 > /home/edwin/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system > files > jobname 'x', input './x', result 'x'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > 2 > 3 > /home/edwin/typography/poster/test/x.tex
open source > 3 > 4 > /home/edwin/context/tex/texmf-context/tex/context/base/type-imp-mathdesign.mkiv
close source > 3 > 4 > /home/edwin/context/tex/texmf-context/tex/context/base/type-imp-mathdesign.mkiv
fonts > defining > font with asked name 'mdbchr7m' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 2 with name 'mdbchr7m' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchri7m' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 3 with name 'mdbchri7m' at 7pt is skipped, not found
fonts > virtual math > loading font 'mdbchrm' subfont 4 with name 'mdbchri7m' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchb7m' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 5 with name 'mdbchb7m' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchbi7m' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 6 with name 'mdbchbi7m' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchr7y' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 7 with name 'mdbchr7y' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchr7v' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 8 with name 'mdbchr7v' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchrma' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 9 with name 'mdbchrma' at 7pt is skipped, not found
fonts > defining > font with asked name 'mdbchrmb' is not found using lookup 'file'
fonts > virtual math > loading font 'mdbchrm' subfont 10 with name 'mdbchrmb' at 7pt is skipped, not found
lua error > error on line 2 in file /home/edwin/typography/poster/test/x.tex:
...n/context/tex/texmf-context/tex/context/base/l-table.lua:323: table index is nil
stack traceback:
...n/context/tex/texmf-context/tex/context/base/l-table.lua:323: in function 'fastcopy'
.../context/tex/texmf-context/tex/context/base/math-vfu.lua:551: in function 'addmissing'
.../context/tex/texmf-context/tex/context/base/math-vfu.lua:1059: in function <.../context/tex/texmf-context/tex/context/base/math-vfu.lua:662>
(...tail calls...)
.../context/tex/texmf-context/tex/context/base/font-def.lua:415: in function 'read'
.../context/tex/texmf-context/tex/context/base/font-ctx.lua:1109: in function 'definefont_two'
[\directlua]:1: in main chunk
1 \loadtypescriptfile[mathdesign]
2 >> \setupbodyfont[charter]
3 \starttext
4 Foo
5 \stoptext
6
?
I tried the stable version too (first-setup.sh --context=current), but no luck.
Initially the standalone version didn't even want to find the Charter font:
$ export OSFONTDIR="/:/etc/texmf:/var/lib/texmf:/usr/share/texmf:/usr/share/texlive/texmf-dist"
[edited font-syn.lua to enable trace_warnings, --track=fonts.warnings appears to have no effect]
$ mtxrun --script fonts --reload
[....]
fonts | names | error when identifying afm font '/usr/share/texlive/texmf-dist/fonts/afm/bitstrea/charter/bchb8a.afm', no matching pfb file
fonts | names | error when identifying afm font '/usr/share/texlive/texmf-dist/fonts/afm/bitstrea/charter/bchbi8a.afm', no matching pfb fil
e
fonts | names | error when identifying afm font '/usr/share/texlive/texmf-dist/fonts/afm/bitstrea/charter/bchr8a.afm', no matching pfb file
fonts | names | error when identifying afm font '/usr/share/texlive/texmf-dist/fonts/afm/bitstrea/charter/bchri8a.afm', no matching pfb file
[...]
The .afm files seem to be available in two places:
/usr/share/fonts/type1/texlive-fonts-recommended/bchr8a.afm
/usr/share/texlive/texmf-dist/fonts/afm/bitstrea/charter/bchr8a.afm
Same for pfb (but the pfb is not always next to the afm):
/usr/share/fonts/type1/texlive-fonts-recommended/bchr8a.pfb
/usr/share/texlive/texmf-dist/fonts/type1/bitstrea/charter/bchr8a.pfb
But modifying OSFONTDIR like this worked:
$ export OSFONTDIR="/usr/share/fonts/type1/texlive-fonts-recommended/:/etc/texmf:/var/lib/texmf:/usr/share/texmf:/usr/share/texlive/texmf-dist"
$ mtxrun --script fonts --reload
[...]
$ mtxrun --script fonts --list --all --pattern=charter
charterbt charterbtbold /usr/share/fonts/type1/texlive-fonts-recommended/bchb8a.afm
charterbtbold charterbtbold /usr/share/fonts/type1/texlive-fonts-recommended/bchb8a.afm
charterbtbolditalic charterbtbolditalic /usr/share/fonts/type1/texlive-fonts-recommended/bchbi8a.afm
charterbtitalic charterbtitalic /usr/share/fonts/type1/texlive-fonts-recommended/bchri8a.afm
charterbtnormal charterbtroman /usr/share/fonts/type1/texlive-fonts-recommended/bchr8a.afm
charterbtroman charterbtroman /usr/share/fonts/type1/texlive-fonts-recommended/bchr8a.afm
The md-chr* files are here, but how do I tell 'mtxrun --script fonts' to load it?
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr7m.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr7t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr7v.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr7y.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8c.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chr8y.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chrc8y.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chree.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chri7m.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chri7t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chri8c.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chri8t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chri8y.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chrma.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chrmb.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chro7t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chro8c.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chro8t.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chro8y.tfm
/usr/share/texlive/texmf-dist/fonts/tfm/public/mathdesign/mdbch/md-chroc8y.tfm
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr7m.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr7t.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr7v.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr7y.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr8c.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chr8t.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chree.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chri7m.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chri7t.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chri8c.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chri8t.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chrma.pfb
/usr/share/texlive/texmf-dist/fonts/type1/public/mathdesign/mdbch/md-chrmb.pfb
[1] ConTeXt from Debian unstable
$ context x.tex
mtx-context | run 1: luatex --fmt="/home/edwin/.texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex/cont-en" --jobname="x" --lua="/home/edwin/.texmf-var/luatex-cache/context/b47c3d3cee7cb6c86268d0595268c442/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./x.tex" --c:input="./x.tex" --c:kindofrun=1 --c:maxnofruns=8 "cont-yes.mkiv"
This is LuaTeX, Version beta-0.79.1 (TeX Live 2014/Debian) (rev 4971)
\write18 enabled.
open source > 1 > 1 > /usr/share/texmf/tex/context/base/cont-yes.mkiv
ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2014.8.15 int: english/english
system > 'cont-new.mkiv' loaded
open source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
close source > 2 > 2 > /usr/share/texmf/tex/context/base/cont-new.mkiv
system > files > jobname 'x', input './x', result 'x'
fonts > latin modern fonts are not preloaded
languages > language 'en' is active
open source > 2 > 3 > /home/edwin/typography/poster/test/x.tex
open source > 3 > 4 > /usr/share/texmf/tex/context/base/type-imp-mathdesign.mkiv
close source > 3 > 4 > /usr/share/texmf/tex/context/base/type-imp-mathdesign.mkiv
mtx-context | fatal error: no return code, message: luatex: execution interrupted
[16895.686916] luatex[27212]: segfault at 18 ip 00000000005f08f1 sp 00007fffa1eaec98 error 4 in luatex[400000+5d8000]
FWIW some valgrind output for LuaTeX beta-0.79.1 (TeX Live 2014/Debian) (rev 4971):
==28129== Invalid read of size 8
==28129== at 0x5F08D7: ??? (in /usr/bin/luatex)
==28129== by 0x5F0987: ??? (in /usr/bin/luatex)
==28129== by 0x5DE068: lua_rawget (in /usr/bin/luatex)
==28129== by 0x449B53: lua_numeric_field_by_index (in /usr/bin/luatex)
==28129== by 0x4D3E02: font_from_lua (in /usr/bin/luatex)
==28129== by 0x497D96: ??? (in /usr/bin/luatex)
==28129== by 0x5E4ABC: ??? (in /usr/bin/luatex)
==28129== by 0x5F36FC: ??? (in /usr/bin/luatex)
==28129== by 0x5E4E17: ??? (in /usr/bin/luatex)
==28129== by 0x5E4498: ??? (in /usr/bin/luatex)
==28129== by 0x5E5040: ??? (in /usr/bin/luatex)
==28129== by 0x5DE783: lua_pcallk (in /usr/bin/luatex)
==28129== Address 0x9378780 is 32 bytes inside a block of size 33 alloc'd
==28129== at 0x4C284C0: malloc (vg_replace_malloc.c:291)
==28129== by 0x4C2A86F: realloc (vg_replace_malloc.c:687)
==28129== by 0x4946FD: ??? (in /usr/bin/luatex)
==28129== by 0x5E8391: ??? (in /usr/bin/luatex)
==28129== by 0x5E7478: ??? (in /usr/bin/luatex)
==28129== by 0x5EE062: ??? (in /usr/bin/luatex)
==28129== by 0x5DDCFB: lua_pushstring (in /usr/bin/luatex)
==28129== by 0x4E2D5E: make_vf_table (in /usr/bin/luatex)
==28129== by 0x5E4ABC: ??? (in /usr/bin/luatex)
==28129== by 0x5F36FC: ??? (in /usr/bin/luatex)
==28129== by 0x5E4E17: ??? (in /usr/bin/luatex)
==28129== by 0x5E4498: ??? (in /usr/bin/luatex)
==28129==
==28129== Use of uninitialised value of size 8
==28129== at 0x5F08F1: ??? (in /usr/bin/luatex)
==28129== by 0x5F0987: ??? (in /usr/bin/luatex)
==28129== by 0x5DE068: lua_rawget (in /usr/bin/luatex)
==28129== by 0x449B53: lua_numeric_field_by_index (in /usr/bin/luatex)
==28129== by 0x4D3E02: font_from_lua (in /usr/bin/luatex)
==28129== by 0x497D96: ??? (in /usr/bin/luatex)
==28129== by 0x5E4ABC: ??? (in /usr/bin/luatex)
==28129== by 0x5F36FC: ??? (in /usr/bin/luatex)
==28129== by 0x5E4E17: ??? (in /usr/bin/luatex)
==28129== by 0x5E4498: ??? (in /usr/bin/luatex)
==28129== by 0x5E5040: ??? (in /usr/bin/luatex)
==28129== by 0x5DE783: lua_pcallk (in /usr/bin/luatex)
==28129==
==28129== Invalid read of size 4
==28129== at 0x5F08F1: ??? (in /usr/bin/luatex)
==28129== by 0x5F0987: ??? (in /usr/bin/luatex)
==28129== by 0x5DE068: lua_rawget (in /usr/bin/luatex)
==28129== by 0x449B53: lua_numeric_field_by_index (in /usr/bin/luatex)
==28129== by 0x4D3E02: font_from_lua (in /usr/bin/luatex)
==28129== by 0x497D96: ??? (in /usr/bin/luatex)
==28129== by 0x5E4ABC: ??? (in /usr/bin/luatex)
==28129== by 0x5F36FC: ??? (in /usr/bin/luatex)
==28129== by 0x5E4E17: ??? (in /usr/bin/luatex)
==28129== by 0x5E4498: ??? (in /usr/bin/luatex)
==28129== by 0x5E5040: ??? (in /usr/bin/luatex)
==28129== by 0x5DE783: lua_pcallk (in /usr/bin/luatex)
==28129== Address 0x18 is not stack'd, malloc'd or (recently) free'd
==28129==
==28129==
==28129== Process terminating with default action of signal 11 (SIGSEGV)
==28129== Access not within mapped region at address 0x18
==28129== at 0x5F08F1: ??? (in /usr/bin/luatex)
==28129== by 0x5F0987: ??? (in /usr/bin/luatex)
==28129== by 0x5DE068: lua_rawget (in /usr/bin/luatex)
==28129== by 0x449B53: lua_numeric_field_by_index (in /usr/bin/luatex)
==28129== by 0x4D3E02: font_from_lua (in /usr/bin/luatex)
==28129== by 0x497D96: ??? (in /usr/bin/luatex)
==28129== by 0x5E4ABC: ??? (in /usr/bin/luatex)
==28129== by 0x5F36FC: ??? (in /usr/bin/luatex)
==28129== by 0x5E4E17: ??? (in /usr/bin/luatex)
==28129== by 0x5E4498: ??? (in /usr/bin/luatex)
==28129== by 0x5E5040: ??? (in /usr/bin/luatex)
==28129== by 0x5DE783: lua_pcallk (in /usr/bin/luatex)
Best regards,
--Edwin