[NTG-context] LuaTeX-Plain and OTF/TTF Fonts

AĆ­re Funvake aire.funvake at gmail.com
Tue May 6 21:51:53 CEST 2014


On Tue May  6 21:13:43 2014, Hans Hagen wrote:
> On 5/6/2014 4:49 PM, Aire Funvake wrote:
>> Dear Group,
>>
>> Thank you for your time. I'm starting out with TeX/ConTeXt, but
>> want to arrive via LuaTeX (`luatex-plain.tex/fmt`). Managed to
>> build, move and use `luatex-plain`. Have the same problem under
>> MacOSX & Win7 (here is the Win-specific decription -- `%CTX%` is
>> my ConTeXt root):
>>
>> ....
>> Setting `OSFONTDIR` before font update and/or before running
>> `luatex-plain`, have no observable effect.
>>
>> So, I do have a manual fix/solution. But is there an easier way?
>
> I assume you made a plain format with:
>
>   mtxrun --script plain --make
>
> Then, does this work:
>
>   mtxrun --script plain luatex-test
>
> okay?
>
> Hans
> 8<-----------------------------------------------------------------

Hi Hans,

No, I made it with `luatex --ini luatex-plain.fmt` and copied
the resulting `.fmt` file. But, I executed the first command
just now, just to be sure, and then ran the next command:
`mtxrun --script plain luatex-test`. Result:

\write18 enabled.
...
tex/texmf-cache/luatex-cache/generic/fonts/data/luatex-fonts-names.luc)(load 
luc
: 
c:/ctx/tex/texmf-cache/luatex-cache/generic/fonts/otf/lmroman10-bold.luc)<unkn
own font in database, run: mtxrun --script fonts --reload --simple>
! LuaTeX error 
...ntext/tex/generic/context/luatex/luatex-fonts-merged.lua:6213:
 attempt to index field 'known' (a nil value).
<to be read again>
\par
l.33

?R<enter>

After `R`, it did produced `luatex-test.pdf`. Not sure if it
looks the way it should ... couple of overfull boxes, narrow
third page.

Either way, I updated the fonts again as above, checked that
it recreated the `luatex-fonts-names.lua` file like before.
If I delete the old `luatex-fonts-names.luc`, the next run of
`luatex-plain hello.tex` produces the same result. Added the
paths to the fonts in `luatex-fonts-names.lua` (minion &
myriad), ran `luatex-plain hello.tex` again ... and all is fine.

Further experimentation: Copied the "Source Sans Pro" fonts to
a subdirectory alongside the `minion` and `myriad` directories,
(`%CTX%\tex\texmf-fonts\otf\sourcesans`), and again updated the
fonts database(s). Upon inspection of `luatex-fonts-names.lua`,
the Source Sans fonts and files are listed, but they *did* have
the path prefixed to the font file names, and consequently, I
could use them without modifying `luatex-fonts-names.lua`.

Thank you for your reply. I'm convinced this is no bug, just my
inexperience at play. This is not a crippling problem. I can
tackle The TeXbook now.

Regards,
Aíre Funvake.




More information about the ntg-context mailing list