[latex3-commits] [git/LaTeX3-latex3-latex2e] master: new lua font loop code thanks to Ulrike and Marcel (70d3ef6)
David Carlisle
d.p.carlisle at gmail.com
Fri Oct 5 20:43:19 CEST 2018
Repository : https://github.com/latex3/latex2e
On branch : master
Link : https://github.com/latex3/latex2e/commit/70d3ef65cc3acb63539e13f00ec5f739d0a9a208
>---------------------------------------------------------------
commit 70d3ef65cc3acb63539e13f00ec5f739d0a9a208
Author: David Carlisle <d.p.carlisle at gmail.com>
Date: Fri Oct 5 19:39:16 2018 +0100
new lua font loop code thanks to Ulrike and Marcel
>---------------------------------------------------------------
70d3ef65cc3acb63539e13f00ec5f739d0a9a208
base/testfiles-TU/tu-tl2e7.luatex.tlg | 23 ++++++++---------------
support/test2e.tex | 15 ++++++++++++---
2 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/base/testfiles-TU/tu-tl2e7.luatex.tlg b/base/testfiles-TU/tu-tl2e7.luatex.tlg
index 08d86a1..690ddfa 100644
--- a/base/testfiles-TU/tu-tl2e7.luatex.tlg
+++ b/base/testfiles-TU/tu-tl2e7.luatex.tlg
@@ -806,18 +806,6 @@ LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line ....
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <5> on input line ....
-.
-\@sect ...\@svsec }\interlinepenalty \@M #8\@@par
- }\endgroup \csname #1mark\...
-l. ...\section{Test of uppercase greek}
-.
-\@sect ...\@svsec }\interlinepenalty \@M #8\@@par
- }\endgroup \csname #1mark\...
-l. ...\section{Test of math accents}
-.
-\@sect ...\@svsec }\interlinepenalty \@M #8\@@par
- }\endgroup \csname #1mark\...
-l. ...\section{Test of roman text in math}
Completed box being shipped out [2]
\vbox(633.0+0.0)x407.0, direction TLT
.\glue 16.0
@@ -1108,7 +1096,7 @@ ne \ETC.}
...\glue 15.08499 plus 4.31 minus 0.86198
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.87
-...\hbox(10.08+2.8944)x345.0, glue set 145.84814fil, direction TLT
+...\hbox(10.08+2.8944)x345.0, glue set 146.75534fil, direction TLT
....\localpar
.....\localinterlinepenalty=0
.....\localbrokenpenalty=0
@@ -1120,6 +1108,7 @@ ne \ETC.}
.....\TU/lmr/bx/n/14.4 5
.....\glue 14.4
....\TU/lmr/bx/n/14.4 T
+....\kern-1.35359 (font)
....\TU/lmr/bx/n/14.4 e
....\TU/lmr/bx/n/14.4 s
....\TU/lmr/bx/n/14.4 t
@@ -1132,6 +1121,7 @@ ne \ETC.}
....\discretionary (penalty 50)
.....< \TU/lmr/bx/n/14.4 -
....\TU/lmr/bx/n/14.4 p
+....\kern0.4464 (font)
....\TU/lmr/bx/n/14.4 e
....\TU/lmr/bx/n/14.4 r
....\discretionary (penalty 50)
@@ -1181,7 +1171,7 @@ ne \ETC.}
...\glue 15.08499 plus 4.31 minus 0.86198
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 7.92
-...\hbox(10.08+0.1728)x345.0, glue set 165.72012fil, direction TLT
+...\hbox(10.08+0.1728)x345.0, glue set 167.52011fil, direction TLT
....\localpar
.....\localinterlinepenalty=0
.....\localbrokenpenalty=0
@@ -1193,6 +1183,7 @@ ne \ETC.}
.....\TU/lmr/bx/n/14.4 6
.....\glue 14.4
....\TU/lmr/bx/n/14.4 T
+....\kern-1.35359 (font)
....\TU/lmr/bx/n/14.4 e
....\TU/lmr/bx/n/14.4 s
....\TU/lmr/bx/n/14.4 t
@@ -1212,6 +1203,7 @@ ne \ETC.}
....\TU/lmr/bx/n/14.4 c
....\TU/lmr/bx/n/14.4 e
....\TU/lmr/bx/n/14.4 n
+....\kern-0.4464 (font)
....\TU/lmr/bx/n/14.4 t
....\TU/lmr/bx/n/14.4 s
....\penalty 10000
@@ -1298,7 +1290,7 @@ ne \ETC.}
...\glue 15.08499 plus 4.31 minus 0.86198
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 7.92
-...\hbox(10.08+0.1728)x345.0, glue set 119.10738fil, direction TLT
+...\hbox(10.08+0.1728)x345.0, glue set 120.46097fil, direction TLT
....\localpar
.....\localinterlinepenalty=0
.....\localbrokenpenalty=0
@@ -1310,6 +1302,7 @@ ne \ETC.}
.....\TU/lmr/bx/n/14.4 7
.....\glue 14.4
....\TU/lmr/bx/n/14.4 T
+....\kern-1.35359 (font)
....\TU/lmr/bx/n/14.4 e
....\TU/lmr/bx/n/14.4 s
....\TU/lmr/bx/n/14.4 t
diff --git a/support/test2e.tex b/support/test2e.tex
index bdaf2f0..8539baf 100644
--- a/support/test2e.tex
+++ b/support/test2e.tex
@@ -225,8 +225,17 @@
% disable this for now on development builds of luatex
\ifx\directlua\undefined\else
-\ifnum\luatexversion<108
+%\ifnum\luatexversion<108
\directlua{
+local function fonteach_next(max, f)
+ repeat
+ f = f + 1
+ if f > max then return end
+ until font.frozen(f) \string~= nil
+ return f, font.getfont(f) or font.fonts[f]
+ end
+ font.latexeach = function() return fonteach_next, font.max(), 0 end
+
local original_fontloader=font.read_tfm
if (luatexbase==nil) then
callback.register('define_font',latexDefineFont)
@@ -243,7 +252,7 @@ end
function latexDefineFont(n,s,i)
local f = nil
- for ii,vv in font.each() do
+ for ii,vv in font.latexeach() do
if (n == vv.name) then
if(vv.size ==
(s > 0 and s
@@ -267,7 +276,7 @@ else
luatexbase.add_to_callback('define_font',latexDefineFont,"latexDefineFont")
end
}
-\fi
+%\fi
\fi
% Load the map file early so it does not appear in the log.
More information about the latex3-commits
mailing list