summaryrefslogtreecommitdiff
path: root/otfl-luat-dum.lua
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2009-04-08 13:18:29 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2009-04-08 13:18:29 +0200
commitc3ccb3ee07e0a67171c24960966ae974e0dd8e98 (patch)
treec5e7ea101bca45dcadb4adda212b36e8b3203066 /otfl-luat-dum.lua
downloadluaotfload-c3ccb3ee07e0a67171c24960966ae974e0dd8e98.tar.gz
adding a first working version of luaotfload
Diffstat (limited to 'otfl-luat-dum.lua')
-rw-r--r--otfl-luat-dum.lua58
1 files changed, 58 insertions, 0 deletions
diff --git a/otfl-luat-dum.lua b/otfl-luat-dum.lua
new file mode 100644
index 0000000..7b959ca
--- /dev/null
+++ b/otfl-luat-dum.lua
@@ -0,0 +1,58 @@
+if not modules then modules = { } end modules ['luat-dum'] = {
+ 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"
+}
+
+local dummyfunction = function() end
+
+statistics = {
+ register = dummyfunction,
+ starttiming = dummyfunction,
+ stoptiming = dummyfunction,
+}
+trackers = {
+ register = dummyfunction,
+ enable = dummyfunction,
+ disable = dummyfunction,
+}
+storage = {
+ register = dummyfunction,
+}
+logs = {
+ report = dummyfunction,
+ simple = dummyfunction,
+}
+tasks = {
+ new = dummyfunction,
+ actions = dummyfunction,
+ appendaction = dummyfunction,
+ prependaction = dummyfunction,
+}
+
+
+-- we need to cheat a bit here
+
+texconfig.kpse_init = true
+
+input = { } -- no fancy file helpers used
+
+local remapper = {
+ otf = "opentype fonts",
+ ttf = "truetype fonts",
+ ttc = "truetype fonts"
+}
+
+function input.find_file(name,kind)
+ name = name:gsub("\\","\/")
+ return kpse.find_file(name,(kind ~= "" and kind) or "tex")
+end
+
+function input.findbinfile(name,kind)
+ if not kind or kind == "" then
+ kind = string.match(name,"%.(.-)$")
+ end
+ return input.find_file(name,kind and remapper[kind])
+end