diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-10-18 00:46:16 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2018-10-18 00:46:16 +0200 |
commit | e2ee706a3114129601a30908d6b8cbb57068d32c (patch) | |
tree | 222b1047f4a7fe1144fefe5d0e52b78604a00f58 /tex/context/modules | |
parent | e5f189d9965a70c8f3043c07c7b07d41ef268e93 (diff) | |
download | context-e2ee706a3114129601a30908d6b8cbb57068d32c.tar.gz |
2018-10-18 00:16:00
Diffstat (limited to 'tex/context/modules')
-rw-r--r-- | tex/context/modules/mkiv/m-scite.mkiv | 6 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-system.lua | 66 | ||||
-rw-r--r-- | tex/context/modules/mkiv/s-fonts-system.mkiv | 6 |
3 files changed, 54 insertions, 24 deletions
diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv index eaac6ecae..9182fa2ec 100644 --- a/tex/context/modules/mkiv/m-scite.mkiv +++ b/tex/context/modules/mkiv/m-scite.mkiv @@ -227,7 +227,7 @@ local function lexdata(data,lexname) end data = indent(data) end -io.savedata("temp.logs ",data) + -- io.savedata("temp.log",data) assignbuffer("lex",data) end @@ -324,11 +324,11 @@ visualizers.register("json", visualizer) \unexpanded\def\buff_scite_slxb#1% {\hangindent\numexpr#1+2\relax\scitespaceskip - \hskip#1\scitespaceskip + \begstrut\hskip#1\scitespaceskip \hangafter 1\relax} \unexpanded\def\buff_scite_slxe - {\par} + {\endstrut\par} \unexpanded\def\buff_scite_slxs {\hskip\scitespaceskip\relax} \unexpanded\def\buff_scite_slxf#1{\hskip#1\scitespaceskip\relax} diff --git a/tex/context/modules/mkiv/s-fonts-system.lua b/tex/context/modules/mkiv/s-fonts-system.lua index 5d2692473..dc0f2e6a3 100644 --- a/tex/context/modules/mkiv/s-fonts-system.lua +++ b/tex/context/modules/mkiv/s-fonts-system.lua @@ -114,7 +114,7 @@ end local splitter = lpeg.splitat(lpeg.S("._"),true) -local method = 3 +local method = 4 function moduledata.fonts.system.showinstalledglyphnames(specification) specification = interfaces.checkedspecification(specification) @@ -129,7 +129,8 @@ function moduledata.fonts.system.showinstalledglyphnames(specification) end end for filename in table.sortedhash(files) do - logs.report("system","fontfile: %s",file.nameonly(filename)) + local fontname = file.nameonly(filename) + logs.report("system","fontfile: %s",fontname) local data = table.load(filename) if data then if method == 1 then @@ -178,31 +179,60 @@ function moduledata.fonts.system.showinstalledglyphnames(specification) end end end + elseif method == 4 then + local descriptions = data.descriptions + if descriptions then + for u, d in sortedhash(descriptions) do + local n = d.name + local u = d.unicode + if n and not u and not find(n,"^%.") then + local n = names[n] + n[#n+1] = fontname + end + end + end else -- nothing end end end - if next(names) then - context.starttabulate { "|l|pl|" } - local f_u = formatters["%04X~(%i)"] - local f_s = formatters["%s~(%i)"] - for k, v in sortedhash(names) do - local t = { } - for k, v in sortedhash(v) do - if type(k) == "string" then - t[#t+1] = f_s(k,v) - else - t[#t+1] = f_u(k,v) + -- names[".notdef"] = nil + -- names[".null"] = nil + if method == 4 then + if next(names) then + context.starttabulate { "|l|pl|" } + local f_u = formatters["%04X~(%i)"] + local f_s = formatters["%s~(%i)"] + for k, v in sortedhash(names) do + NC() ctx_verbatim(k) + NC() context("% t",v) + NC() NR() + end + context.stoptabulate() + end + table.save("s-fonts-system-glyph-unknowns.lua",names) + else + if next(names) then + context.starttabulate { "|l|pl|" } + local f_u = formatters["%04X~(%i)"] + local f_s = formatters["%s~(%i)"] + for k, v in sortedhash(names) do + local t = { } + for k, v in sortedhash(v) do + if type(k) == "string" then + t[#t+1] = f_s(k,v) + else + t[#t+1] = f_u(k,v) + end end + NC() ctx_verbatim(k) + NC() context("%, t",t) + NC() NR() end - NC() ctx_verbatim(k) - NC() context("% t",t) - NC() NR() + context.stoptabulate() end - context.stoptabulate() + table.save("s-fonts-system-glyph-names.lua",names) end - table.save("s-fonts-system-glyph-names.lua",names) end -- -- -- diff --git a/tex/context/modules/mkiv/s-fonts-system.mkiv b/tex/context/modules/mkiv/s-fonts-system.mkiv index 03599b0df..9a0f7485d 100644 --- a/tex/context/modules/mkiv/s-fonts-system.mkiv +++ b/tex/context/modules/mkiv/s-fonts-system.mkiv @@ -39,12 +39,12 @@ % \showinstalledfonts - \enabletrackers[otf.keepnames] +% \enabletrackers[otf.keepnames] - \cacheinstalledfonts[suffixes={otf,ttf,afm}] +% \cacheinstalledfonts[suffixes={otf,ttf,afm}] % \cacheinstalledfonts[threshold=4000000,suffixes={otf,ttf,afm}] % \cacheinstalledfonts[threshold=2000000,suffixes={otf,ttf,afm}] -% \showinstalledglyphnames + \showinstalledglyphnames \stoptext |