summaryrefslogtreecommitdiff
path: root/luaotfload-override.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-08 17:31:04 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-08 17:31:04 +0200
commit4921643624581f05c0f0bb17d7960b599872238c (patch)
tree741df28890c331aec801bb8d82daf3fd0ab76c0d /luaotfload-override.lua
parent9c8b4e0d6b2ca6557b490513a4d90182df12d16d (diff)
downloadluaotfload-4921643624581f05c0f0bb17d7960b599872238c.tar.gz
ignore glyph list workaround when running the db tool
Diffstat (limited to 'luaotfload-override.lua')
-rw-r--r--luaotfload-override.lua48
1 files changed, 25 insertions, 23 deletions
diff --git a/luaotfload-override.lua b/luaotfload-override.lua
index c047dad..f143009 100644
--- a/luaotfload-override.lua
+++ b/luaotfload-override.lua
@@ -101,32 +101,34 @@ logs.names_report = names_report
--doc]]--
-if next(fonts.encodings.agl) then
- print(next, fonts.encodings.agl)
- --- unnecessary because the file shouldn’t be loaded at this time
- --- but we’re just making sure
- fonts.encodings.agl = nil
- collectgarbage"collect"
-end
-
+if fonts then --- need to be running TeX
+ if next(fonts.encodings.agl) then
+ print(next, fonts.encodings.agl)
+ --- unnecessary because the file shouldn’t be loaded at this time
+ --- but we’re just making sure
+ fonts.encodings.agl = nil
+ collectgarbage"collect"
+ end
-fonts.encodings.agl = { }
-setmetatable(fonts.encodings.agl, { __index = function (t, k)
- if k == "unicodes" then
- local glyphlist = resolvers.findfile"luaotfload-glyphlist.lua"
- if glyphlist then
- names_report("both", 0, "load", "loading the Adobe glyph list")
+ fonts.encodings.agl = { }
+
+ setmetatable(fonts.encodings.agl, { __index = function (t, k)
+ if k == "unicodes" then
+ local glyphlist = resolvers.findfile"luaotfload-glyphlist.lua"
+ if glyphlist then
+ names_report("both", 0, "load", "loading the Adobe glyph list")
+ else
+ glyphlist = resolvers.findfile"font-age.lua"
+ names_report("both", 0, "load", "loading the extended glyph list from ConTeXt")
+ end
+ local unicodes = dofile(glyphlist)
+ fonts.encodings.agl = { unicodes = unicodes }
+ return unicodes
else
- glyphlist = resolvers.findfile"font-age.lua"
- names_report("both", 0, "load", "loading the extended glyph list from ConTeXt")
+ return nil
end
- local unicodes = dofile(glyphlist)
- fonts.encodings.agl = { unicodes = unicodes }
- return unicodes
- else
- return nil
- end
-end })
+ end })
+end
-- vim:tw=71:sw=4:ts=4:expandtab