diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-11-20 22:05:33 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-11-20 22:05:33 +0100 |
commit | 4256d04d076d788428d4a8eb9a316da9d52a1622 (patch) | |
tree | c7120bd4b8576c85022f936df0e72a40c71bae37 /src/luaotfload-auxiliary.lua | |
parent | 7baac9244235ce00255a0f61c5931585aa99163c (diff) | |
parent | cf6c8c94cc88db6564ccea266b3c6d8f7a5bb1a1 (diff) | |
download | luaotfload-4256d04d076d788428d4a8eb9a316da9d52a1622.tar.gz |
Merge pull request #291 from phi-gamma/master
pluggable fontloaders
Diffstat (limited to 'src/luaotfload-auxiliary.lua')
-rw-r--r-- | src/luaotfload-auxiliary.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/luaotfload-auxiliary.lua b/src/luaotfload-auxiliary.lua index 1ef581e..15541af 100644 --- a/src/luaotfload-auxiliary.lua +++ b/src/luaotfload-auxiliary.lua @@ -4,8 +4,6 @@ -- DESCRIPTION: part of luaotfload -- REQUIREMENTS: luaotfload 2.6 -- AUTHOR: Khaled Hosny, Élie Roux, Philipp Gesang --- VERSION: 2.6 --- MODIFIED: 2015-03-29 12:43:26+0200 ----------------------------------------------------------------------- -- @@ -19,6 +17,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 +213,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 +229,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 +290,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] |