3

Thanks for both replies, the question was solved ...till today. Did a tlmgr update -all of texlive2019, rebuilt the database of fonts as described in the texlive documentation, the processes not throwing errors, but since, and only luatex, throws the following error on the terminal, and produces no output pdf.

Terminal stdout of luatex run on file, both versions the commented and the non-commented content was used:

Sourcefile:

%\input luafonts

%\input opmac

%\font\tenrm="DejaVu Serif"

%\tenrm Hello

%\bye

%%% and the second part, of course commented while uncommenting the first part 

%%% above this line.

\input opmac.tex

\input luaotfload.sty

\font\tenrm="DejaVu Serif"

\tenrm

Hello

\bye

Terminal output:

FONT: AMS math fonts - \mathchardef's prepared, 12 math families preloaded.)                                                            

OPmac: etex.src macros detected (/home/m___/.texmf/tex/mtex/opmac-luatex.tex))                                                          

(/home/m___/.texmf/tex/mtex/luaotfload.sty                                                                                              

(/home/m___/.texmf/tex/mtex/ltluatex.tex)                                                                                               

luaotfload | load : FATAL ERROR                                                                                                         

luaotfload | load :   × Failed to load module "luaotfload-database.lua".                                                                

luaotfload | load :   × Error message:                                                                                                  

luaotfload | load :     × "[string \"-- luatex-core security and io overloads 

.......\"]:45: bad argument #1 to 'io_open' (string expect

ed, got nil)".                                                                                                                          

stack traceback:                                                                                                                        

        ...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:181: in 

upvalue 'loadmodule'                                        

        ...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:257: in 

local 'initialize'                                          

        ...019/texmf-dist/tex/luatex/luaotfload/luaotfload-main.lua:307: in 

field 'main'                                                

        [\directlua]:1: in main chunk                                                                                                   

+ 1! ~/proj:

Both runs have the same output to terminal, I realize that not having looked into luatex and it's code, that some luaprimitives must be at play here? Could you suggest where to start in solving the issue again. Tnks.

3

I don't think this has ever worked in LuaTeX.

Add the font loader support.

\input opmac.tex
\input luaotfload.sty

\font\tenrm="DejaVu Serif"

\tenrm

Hello

\bye 
  • Your suggestion solved the complaints of luatex. Is there a file that needs inputting using xetex and otf fonts? Using opmac.tex with engine xetex and using one of the opmac defined fonts (unicode Linux Libertine) does not. Could not get any other otf fonts defined on the system texlive2019 to be recognized though? – m___ Feb 7 '20 at 17:58
  • @m___ There is a fundamental difference between XeTeX and LuaTeX. The former has a font loader able to load OTF fonts in various ways, the latter doesn't and luaotfload adds the ability. – egreg Feb 7 '20 at 18:09
3

LuaTeX needs to initialize font loading in extension mode (where \font primitive is able to load OTF fonts). This could be done by \input luafonts (a simple macro file from csplain) or by \input luaotfloads.sty as mentioned above.

\input luafonts
\input opmac
\font\tenrm="DejaVu Serif"
\tenrm Hello
\bye

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.