summaryrefslogtreecommitdiff
path: root/src/luaotfload-auxiliary.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luaotfload-auxiliary.lua')
-rw-r--r--src/luaotfload-auxiliary.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua
index 1ef581e..dce0d60 100644
--- a/src/luaotfload-auxiliary.lua
+++ b/src/luaotfload-auxiliary.lua
@@ -19,6 +19,7 @@ local aux = luaotfload.aux
local log = luaotfload.log
local report = log.report
local fonthashes = fonts.hashes
+local encodings = fonts.encodings
local identifiers = fonthashes.identifiers
local fontnames = fonts.names
@@ -214,8 +215,6 @@ luatexbase.add_to_callback(
--- glyphs and characters
-----------------------------------------------------------------------
-local agl = fonts.encodings.agl
-
--- int -> int -> bool
local font_has_glyph = function (font_id, codepoint)
local fontdata = fonts.hashes.identifiers[font_id]
@@ -232,7 +231,7 @@ aux.font_has_glyph = font_has_glyph
local raw_slot_of_name = function (font_id, glyphname)
local fontdata = font.fonts[font_id]
if fontdata.type == "virtual" then --- get base font for glyph idx
- local codepoint = agl.unicodes[glyphname]
+ local codepoint = encodings.agl.unicodes[glyphname]
local glyph = fontdata.characters[codepoint]
if fontdata.characters[codepoint] then
return codepoint
@@ -293,7 +292,7 @@ local indices
--- int -> (string | false)
local name_of_slot = function (codepoint)
if not indices then --- this will load the glyph list
- local unicodes = agl.unicodes
+ local unicodes = encodings.agl.unicodes
indices = table.swapped(unicodes)
end
local glyphname = indices[codepoint]