1 -- the following is adapted from https://tex.stackexchange.com/a/380780
3 function ft.print_glyphs(maxCols,maxChars)
4 local id = font.current()
5 local fnt = font.getfont(id)
7 local maxU4 = 15*(16^3+16^2+16+1)
9 for k, v in pairs(fnt.characters) do
13 for i, k in ipairs(a) do
14 if i >= maxChars then break end
17 tex.sprint(string.format("U+%06x", k))
19 tex.sprint(string.format("U+%04x", k))
24 tex.sprint(string.format([[\char%i]], k))
28 if col == maxCols then
29 tex.sprint([[\\\cline{2-]] .. maxCols+1 .. "} ")