summaryrefslogtreecommitdiff
path: root/tex/context/base/font-lua.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/font-lua.lua')
-rw-r--r--tex/context/base/font-lua.lua23
1 files changed, 12 insertions, 11 deletions
diff --git a/tex/context/base/font-lua.lua b/tex/context/base/font-lua.lua
index a6fcc1642..48ce3c2f5 100644
--- a/tex/context/base/font-lua.lua
+++ b/tex/context/base/font-lua.lua
@@ -8,11 +8,13 @@ if not modules then modules = { } end modules ['font-lua'] = {
local trace_defining = false trackers.register("fonts.defining", function(v) trace_defining = v end)
-local report_lua = logs.reporter("fonts","lua loading")
+local report_lua = logs.reporter("fonts","lua loading")
-fonts.formats.lua = "lua"
+local fonts = fonts
+local readers = fonts.readers
+fonts.formats.lua = "lua"
-local readers = fonts.tfm.readers
+-- we could add support for features here
local function check_lua(specification,fullname)
-- standard tex file lookup
@@ -24,22 +26,21 @@ local function check_lua(specification,fullname)
end
end
+readers.check_lua = check_lua
+
function readers.lua(specification)
local original = specification.specification
if trace_defining then
report_lua("using lua reader for '%s'",original)
end
- local fullname, tfmtable = specification.filename or "", nil
+ local fullname = specification.filename or ""
if fullname == "" then
local forced = specification.forced or ""
if forced ~= "" then
- tfmtable = check_lua(specification,specification.name .. "." .. forced)
- end
- if not tfmtable then
- tfmtable = check_lua(specification,specification.name)
+ fullname = specification.name .. "." .. forced
+ else
+ fullname = specification.name
end
- else
- tfmtable = check_lua(specification,fullname)
end
- return tfmtable
+ return check_lua(specification,fullname)
end