[latex3-commits] [latex2e-public] r1288 - fix testing order and log any error messages while trying luaotfload

noreply at latex-project.org noreply at latex-project.org
Mon Dec 5 10:48:59 CET 2016


Author: carlisle
Date: 2016-12-05 10:48:58 +0100 (Mon, 05 Dec 2016)
New Revision: 1288

Modified:
   trunk/base/ltluatex.dtx
Log:
fix testing order and log any error messages while trying luaotfload

Modified: trunk/base/ltluatex.dtx
===================================================================
--- trunk/base/ltluatex.dtx	2016-12-04 23:47:35 UTC (rev 1287)
+++ trunk/base/ltluatex.dtx	2016-12-05 09:48:58 UTC (rev 1288)
@@ -806,13 +806,16 @@
 %    \begin{macrocode}
 %<2ekernel>\everyjob\expandafter{%
 %<2ekernel>  \the\everyjob
-%<2ekernel>\fontencoding{%
-%<2ekernel>\directlua{
-%<2ekernel>tex.print((pcall(function ()
-%<2ekernel>           require('luaotfload-main')
-%<2ekernel>           local _void = luaotfload.main ()
-%<2ekernel>          end) and 'TU') or 'OT1')
-%<2ekernel>}}\let\encodingdefault\f at encoding}
+%<2ekernel>  \directlua{%
+%<2ekernel>  if xpcall(function ()%
+%<2ekernel>             require('luaotfload-main')%
+%<2ekernel>            end,texio.write_nl) then %
+%<2ekernel>  local _void = luaotfload.main ()%
+%<2ekernel>  else %
+%<2ekernel>  texio.write_nl('Error in luaotfload: reverting to OT1')%
+%<2ekernel>  tex.print('\string\\def\string\\encodingdefault{OT1}')%
+%<2ekernel>  end}%
+%<2ekernel>  \let\f at encoding\encodingdefault}
 %<latexrelease>\IncludeInRelease{2017/01/01}%
 %<latexrelease>                 {\fontencoding}{TU in everyjob}%
 %<latexrelease>\fontencoding{TU}\let\encodingdefault\f at encoding



More information about the latex3-commits mailing list