diff options
Diffstat (limited to 'Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2')
-rw-r--r-- | Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2 | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2 b/Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2 index eb06c14cb64..342fd1c6118 100644 --- a/Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2 +++ b/Master/texmf-dist/doc/luatex/luaintro/02-02-8.lualtx2 @@ -4,7 +4,7 @@ %% 1. Auflage %% %% -%% Copyright (C) 2013 Herbert Voss +%% Copyright (C) 2014 Herbert Voss %% %% It may be distributed and/or modified under the conditions %% of the LaTeX Project Public License, either version 1.3 @@ -27,17 +27,25 @@ \newfontface\LMML{Latin Modern Mono Light Cond} \begin{luacode} local teststring = "Lua\\LaTeX~--~Eine Einführung." -local myfonts = dofile(fonts.names.path.dir .. "/" .. fonts.names.path.basename) function printFontDemo(fontname) + local starttime = os.gettimeofday () + local foundname = file.replacesuffix (config.luaotfload.paths.index_path_lua, "luc") + local fh = io.open (foundname, "rb") + local chunk = fh:read"*all" + fh:close() + local code = load (chunk, "b") + data = code() local fnA = string.lower(fontname) local a = {} local b = {} - for i, v in ipairs(myfonts.mappings) do - m, n = string.find(string.lower(v.names.family),fnA) +-- print(table.serialize(data.mappings[1])) + for i, v in ipairs(data.mappings) do + m, n = string.find(string.lower(v.familyname),fnA) if m then a[v.fontname] = v.familyname b[#b + 1] = v.fontname end + print(i, tostring(v.familyname)) end table.sort(b) for i, v in ipairs(b) do |