[luatex] Logging of font names in box log output

David Carlisle d.p.carlisle at gmail.com
Wed Sep 9 10:28:35 CEST 2015


Hans wrote

> \number\fontid\font

By the way \fontid doesn't seem to be documented in the luatex 0.80
manual (other than being listed as
an entry in the table returned by tex.extraprimitives)  could it be
added (to section 2.7 I would guess) thanks

With the hints you gave last night it was easy to find the right bits
of the manual to produce

\documentclass{article}

\begin{document}
\font\a=cmr10
\font\b=cmr10

\directlua{
for i,v in font.each() do
print(i .. ' ' .. v.name ..' ' .. v.size .. ' ' ..
tex.fontidentifier(i) .. "\string\n")
end
}
\end{document}


which produces a log ending in

15 cmr10 655360 \OT1/cmr/m/n/10

16 cmr10 655360 \a

17 cmr10 655360 \b

Which one way or another (details left to another day:-) is enough
information to
either modify the current font loader to recognise duplicate fonts, or
probably simpler
just detect this in the regression test suite and take appropriate action.
(eg \let\b\a would be enough for our purposes)

David


More information about the luatex mailing list