diff options
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-basics.tex | 12 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-enc.lua | 10 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 10 |
3 files changed, 24 insertions, 8 deletions
diff --git a/tex/generic/context/luatex/luatex-basics.tex b/tex/generic/context/luatex/luatex-basics.tex index 1180c68e6..7b84c7093 100644 --- a/tex/generic/context/luatex/luatex-basics.tex +++ b/tex/generic/context/luatex/luatex-basics.tex @@ -31,8 +31,8 @@ local registered = {} function gadgets.functions.reverve() - local numb = newtoken.scan_int() - local name = newtoken.scan_string() + local numb = token.scan_int() + local name = token.scan_string() local okay = string.gsub(name,"[\string\\ ]","") registered[okay] = numb texio.write_nl("reserving lua function '"..okay.."' with number "..numb) @@ -62,15 +62,18 @@ % an example of usage (if we ever support it it will go to the plain gadgets module): % +% \newluafunction\UcharcatLuaOne +% \newluafunction\UcharcatLuaTwo +% % \directlua { % % local cct = nil % local chr = nil % % gadgets.functions.register("UcharcatLuaOne",function() -% chr = newtoken.scan_int() +% chr = token.scan_int() % cct = tex.getcatcode(chr) -% tex.setcatcode(chr,newtoken.scan_int()) +% tex.setcatcode(chr,token.scan_int()) % tex.sprint(unicode.utf8.char(chr)) % end) % @@ -89,5 +92,4 @@ % A:\the\catcode65:\Ucharcat 65 5:A:\the\catcode65\par % A:\the\catcode65:\Ucharcat 65 11:A:\the\catcode65\par - \endinput diff --git a/tex/generic/context/luatex/luatex-fonts-enc.lua b/tex/generic/context/luatex/luatex-fonts-enc.lua index 2bc6b71bf..d8725c214 100644 --- a/tex/generic/context/luatex/luatex-fonts-enc.lua +++ b/tex/generic/context/luatex/luatex-fonts-enc.lua @@ -16,10 +16,18 @@ fonts.encodings = encodings encodings.agl = { } encodings.known = { } +encodings.glyphlistfilename = "font-age.lua" + setmetatable(encodings.agl, { __index = function(t,k) if k == "unicodes" then logs.report("fonts","loading (extended) adobe glyph list") - local unicodes = dofile(resolvers.findfile("font-age.lua")) + local foundname = resolvers.findfile(encodings.glyphlistfilename) or "" + local unicodes = foundname ~= "" and dofile(foundname) + if type(unicodes) ~= "table" then + logs.report("fonts","missing or invalid (extended) adobe glyph list") + -- no message + unicodes = { } + end encodings.agl = { unicodes = unicodes } return unicodes else diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index b77497ea1..fc87d5d69 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 2021-08-30 19:53 +-- merge date : 2021-09-03 18:45 do -- begin closure to overcome local limits and interference @@ -10263,10 +10263,16 @@ local encodings={} fonts.encodings=encodings encodings.agl={} encodings.known={} +encodings.glyphlistfilename="font-age.lua" setmetatable(encodings.agl,{ __index=function(t,k) if k=="unicodes" then logs.report("fonts","loading (extended) adobe glyph list") - local unicodes=dofile(resolvers.findfile("font-age.lua")) + local foundname=resolvers.findfile(encodings.glyphlistfilename) or "" + local unicodes=foundname~="" and dofile(foundname) + if type(unicodes)~="table" then + logs.report("fonts","missing or invalid (extended) adobe glyph list") + unicodes={} + end encodings.agl={ unicodes=unicodes } return unicodes else |