summaryrefslogtreecommitdiff
path: root/luaotfload-override.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:27:37 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-09 13:27:37 -0700
commitf0d437bc1bdf18f5eb7e296df7b3784cb04dabc2 (patch)
treeccd6c6247f4d4c6117b3e0800b8bfd769de798be /luaotfload-override.lua
parentae8ffd0615b797d91cd8799debf12e2891c5b0d2 (diff)
parent7647a39d3d704888b105dfb000970b7bd60d7682 (diff)
downloadluaotfload-f0d437bc1bdf18f5eb7e296df7b3784cb04dabc2.tar.gz
Merge pull request #53 from phi-gamma/master
pdf.js bug and font scaling
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