summaryrefslogtreecommitdiff
path: root/tex/generic/context/luatex/luatex-basics-gen.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-12-29 00:00:16 +0200
committerMarius <mariausol@gmail.com>2012-12-29 00:00:16 +0200
commitf8d3835211dbbac2ed31376d655642571db52f4e (patch)
tree81017e6a4f1c5351cf2bc4d3b15a1b838e4394e4 /tex/generic/context/luatex/luatex-basics-gen.lua
parent290581646ba1e91eb2be7086ec32653d1a33841f (diff)
downloadcontext-f8d3835211dbbac2ed31376d655642571db52f4e.tar.gz
beta 2012.12.28 20:30
Diffstat (limited to 'tex/generic/context/luatex/luatex-basics-gen.lua')
-rw-r--r--tex/generic/context/luatex/luatex-basics-gen.lua44
1 files changed, 27 insertions, 17 deletions
diff --git a/tex/generic/context/luatex/luatex-basics-gen.lua b/tex/generic/context/luatex/luatex-basics-gen.lua
index 2f03efba8..e7e98154a 100644
--- a/tex/generic/context/luatex/luatex-basics-gen.lua
+++ b/tex/generic/context/luatex/luatex-basics-gen.lua
@@ -74,32 +74,42 @@ texconfig.kpse_init = true
resolvers = resolvers or { } -- no fancy file helpers used
local remapper = {
- otf = "opentype fonts",
- ttf = "truetype fonts",
- ttc = "truetype fonts",
- dfont = "truetype fonts", -- "truetype dictionary",
- cid = "cid maps",
- fea = "font feature files",
- pfa = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
- pfb = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
+ otf = "opentype fonts",
+ ttf = "truetype fonts",
+ ttc = "truetype fonts",
+ dfont = "truetype fonts", -- "truetype dictionary",
+ cid = "cid maps",
+ cidmap = "cid maps",
+ fea = "font feature files",
+ pfa = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
+ pfb = "type1 fonts", -- this is for Khaled, in ConTeXt we don't use this!
}
function resolvers.findfile(name,fileformat)
- name = string.gsub(name,"\\","\/")
- fileformat = fileformat and string.lower(fileformat)
- local found = kpse.find_file(name,(fileformat and fileformat ~= "" and (remapper[fileformat] or fileformat)) or file.suffix(name,"tex"))
+ name = string.gsub(name,"\\","/")
+ if not fileformat or fileformat == "" then
+ fileformat = file.suffix(name)
+ if fileformat == "" then
+ fileformat = "tex"
+ end
+ end
+ fileformat = string.lower(fileformat)
+ fileformat = remapper[fileformat] or fileformat
+ local found = kpse.find_file(name,fileformat)
if not found or found == "" then
found = kpse.find_file(name,"other text files")
end
return found
end
-function resolvers.findbinfile(name,fileformat)
- if not fileformat or fileformat == "" then
- fileformat = file.suffix(name) -- string.match(name,"%.([^%.]-)$")
- end
- return resolvers.findfile(name,(fileformat and remapper[fileformat]) or fileformat)
-end
+-- function resolvers.findbinfile(name,fileformat)
+-- if not fileformat or fileformat == "" then
+-- fileformat = file.suffix(name)
+-- end
+-- return resolvers.findfile(name,(fileformat and remapper[fileformat]) or fileformat)
+-- end
+
+resolvers.findbinfile = resolvers.findfile
function resolvers.resolve(s)
return s