blob: b025561072e9bdf6893533ce090a99eda8b44027 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
\input luaotfload.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% unicode character mappings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\font\ptserifregular = file:PTF55F.ttf \ptserifregular
%% here we map the function luaotfload.aux.name_of_codepoint
%% on a short text, printing a list of letters, their codepoints
%% and names (as specified in the Adobe Glyph List).
\directlua{
local aux = luaotfload.aux
local cbk = function (str)
if string.match(str, "^EOF") then
luatexbase.remove_from_callback("process_input_buffer", "weird")
return [[the end!]]
end
local res = { }
for chr in string.utfcharacters(str) do
local val = unicode.utf8.byte(chr)
local line = chr .. " <> " .. tostring(val)
line = line .. " <> " .. (aux.name_of_codepoint(val) or "")
res[\string#res+1] = line
end
return table.concat(res, [[\endgraf]])
end
luatexbase.add_to_callback("process_input_buffer", cbk, "weird")
}
Я узнал что у меня
Есть огромная семья
И тропинка и лесок
В поле каждый колосок
EOF
\bye
|