2 \documentclass{article}
4 \usepackage{luaotfload,booktabs,array,luacode,longtable}
5 \usepackage[scale=0.8]{geometry}
8 \ifdefined\myfontname\else
10 \message{@Name of the font to test = }
11 \read-1 to\myfontname \global\let\myfontname\myfontname
14 \font\test=\myfontname\space at 12pt
16 ident = fonts.hashes.identifiers[font.current()]
21 \def\FMT#1#2{{\oalign{\test\char#1\crcr\rm\tiny\hss#2\hss\crcr}}}
22 \def\OUT#1{\leavevmode\hbox to 7em{{\test\char"#1}\ ({\tt U+#1})\hss}}%"
24 {\noindent\Large\bf \myfontname\\\null\hfill (%
25 \directlua{tex.sprint(ident.fullname)}%
32 local t = ident.shared.rawdata
35 local ivs, ivsi = {}, {}
36 for i,v in pairs(t) do
38 for j,w in pairs(v) do
39 if not ivs[j] then table.insert(ivsi,j); ivs[j]=ivs[j] or {}; end
40 table.insert(ivs[j],{i-0xE0100,w})
44 local sort = table.sort
45 local sortfn = function (a,b) return a[1]<b[1] end
47 for _,v in pairs(ivsi) do
49 tex.sprint('\\OUT{' .. string.format('%X', v) .. '}\\ ')
50 for _, cn in pairs(ivs[v]) do
51 tex.sprint('\\FMT{' .. tostring(cn[2]) .. '}{' .. cn[1] .. '}' )