From 560adec29f2a0619545984f274220757b3e4ebb0 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 4 Oct 2011 01:39:17 +0200 Subject: Rename files to follow new ConTeXt names --- luaotfload.dtx | 4 ++-- otfl-font-lua.lua | 33 --------------------------------- otfl-font-tfm.lua | 38 -------------------------------------- otfl-fonts-lua.lua | 33 +++++++++++++++++++++++++++++++++ otfl-fonts-tfm.lua | 38 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 73 deletions(-) delete mode 100644 otfl-font-lua.lua delete mode 100644 otfl-font-tfm.lua create mode 100644 otfl-fonts-lua.lua create mode 100644 otfl-fonts-tfm.lua diff --git a/luaotfload.dtx b/luaotfload.dtx index 92131e6..5cbabc3 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -583,14 +583,14 @@ luaotfload.loadmodule('fonts-enc.lua') -- will load font-age on demand luaotfload.loadmodule('font-cid.lua') luaotfload.loadmodule('font-map.lua') -- for loading lum file (will be stripped) luaotfload.loadmodule('font-nms.lua') -luaotfload.loadmodule('font-tfm.lua') +luaotfload.loadmodule('fonts-tfm.lua') luaotfload.loadmodule('font-oti.lua') luaotfload.loadmodule('font-otf.lua') luaotfload.loadmodule('font-otb.lua') luaotfload.loadmodule('node-inj.lua') -- will be replaced (luatex >= .70) luaotfload.loadmodule('font-otn.lua') luaotfload.loadmodule('font-ota.lua') -luaotfload.loadmodule('font-lua.lua') +luaotfload.loadmodule('fonts-lua.lua') luaotfload.loadmodule('font-def.lua') luaotfload.loadmodule('fonts-def.lua') luaotfload.loadmodule('fonts-ext.lua') -- some extensions diff --git a/otfl-font-lua.lua b/otfl-font-lua.lua deleted file mode 100644 index ec3fe38..0000000 --- a/otfl-font-lua.lua +++ /dev/null @@ -1,33 +0,0 @@ -if not modules then modules = { } end modules ['luatex-fonts-lua'] = { - version = 1.001, - comment = "companion to luatex-*.tex", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -if context then - texio.write_nl("fatal error: this module is not for context") - os.exit() -end - -local fonts = fonts -fonts.formats.lua = "lua" - -function fonts.readers.lua(specification) - local fullname = specification.filename or "" - if fullname == "" then - local forced = specification.forced or "" - if forced ~= "" then - fullname = specification.name .. "." .. forced - else - fullname = specification.name - end - end - local fullname = resolvers.findfile(fullname) or "" - if fullname ~= "" then - local loader = loadfile(fullname) - loader = loader and loader() - return loader and loader(specification) - end -end diff --git a/otfl-font-tfm.lua b/otfl-font-tfm.lua deleted file mode 100644 index b9bb1bd..0000000 --- a/otfl-font-tfm.lua +++ /dev/null @@ -1,38 +0,0 @@ -if not modules then modules = { } end modules ['luatex-fonts-tfm'] = { - version = 1.001, - comment = "companion to luatex-*.tex", - author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", - copyright = "PRAGMA ADE / ConTeXt Development Team", - license = "see context related readme files" -} - -if context then - texio.write_nl("fatal error: this module is not for context") - os.exit() -end - -local fonts = fonts -local tfm = { } -fonts.handlers.tfm = tfm -fonts.formats.tfm = "type1" -- we need to have at least a value here - -function fonts.readers.tfm(specification) - local fullname = specification.filename or "" - if fullname == "" then - local forced = specification.forced or "" - if forced ~= "" then - fullname = specification.name .. "." .. forced - else - fullname = specification.name - end - end - local foundname = resolvers.findbinfile(fullname, 'tfm') or "" - if foundname == "" then - foundname = resolvers.findbinfile(fullname, 'ofm') or "" - end - if foundname ~= "" then - specification.filename = foundname - specification.format = "ofm" - return font.read_tfm(specification.filename,specification.size) - end -end diff --git a/otfl-fonts-lua.lua b/otfl-fonts-lua.lua new file mode 100644 index 0000000..ec3fe38 --- /dev/null +++ b/otfl-fonts-lua.lua @@ -0,0 +1,33 @@ +if not modules then modules = { } end modules ['luatex-fonts-lua'] = { + version = 1.001, + comment = "companion to luatex-*.tex", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +if context then + texio.write_nl("fatal error: this module is not for context") + os.exit() +end + +local fonts = fonts +fonts.formats.lua = "lua" + +function fonts.readers.lua(specification) + local fullname = specification.filename or "" + if fullname == "" then + local forced = specification.forced or "" + if forced ~= "" then + fullname = specification.name .. "." .. forced + else + fullname = specification.name + end + end + local fullname = resolvers.findfile(fullname) or "" + if fullname ~= "" then + local loader = loadfile(fullname) + loader = loader and loader() + return loader and loader(specification) + end +end diff --git a/otfl-fonts-tfm.lua b/otfl-fonts-tfm.lua new file mode 100644 index 0000000..b9bb1bd --- /dev/null +++ b/otfl-fonts-tfm.lua @@ -0,0 +1,38 @@ +if not modules then modules = { } end modules ['luatex-fonts-tfm'] = { + version = 1.001, + comment = "companion to luatex-*.tex", + author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", + copyright = "PRAGMA ADE / ConTeXt Development Team", + license = "see context related readme files" +} + +if context then + texio.write_nl("fatal error: this module is not for context") + os.exit() +end + +local fonts = fonts +local tfm = { } +fonts.handlers.tfm = tfm +fonts.formats.tfm = "type1" -- we need to have at least a value here + +function fonts.readers.tfm(specification) + local fullname = specification.filename or "" + if fullname == "" then + local forced = specification.forced or "" + if forced ~= "" then + fullname = specification.name .. "." .. forced + else + fullname = specification.name + end + end + local foundname = resolvers.findbinfile(fullname, 'tfm') or "" + if foundname == "" then + foundname = resolvers.findbinfile(fullname, 'ofm') or "" + end + if foundname ~= "" then + specification.filename = foundname + specification.format = "ofm" + return font.read_tfm(specification.filename,specification.size) + end +end -- cgit v1.2.3