summaryrefslogtreecommitdiff
path: root/luaotfload-auxiliary.lua
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-03 05:43:22 -0700
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-03 05:43:22 -0700
commit8c5fb4b380191aefd6ddc0fcb738b24f740f4496 (patch)
tree27df2d2f1bee98c36731d219bf7e3535aef218f8 /luaotfload-auxiliary.lua
parent225c63363a259867bad8848e9e9880e43cbf4ad5 (diff)
parent778267979a304bd83228fd0077c453a953d35fd0 (diff)
downloadluaotfload-8c5fb4b380191aefd6ddc0fcb738b24f740f4496.tar.gz
Merge pull request #35 from eroux/master
Proposal for minor changes in the aux library
Diffstat (limited to 'luaotfload-auxiliary.lua')
-rw-r--r--luaotfload-auxiliary.lua25
1 files changed, 3 insertions, 22 deletions
diff --git a/luaotfload-auxiliary.lua b/luaotfload-auxiliary.lua
index 2cf1e00..844c170 100644
--- a/luaotfload-auxiliary.lua
+++ b/luaotfload-auxiliary.lua
@@ -155,25 +155,6 @@ end
aux.font_has_glyph = font_has_glyph
---- int -> bool
-local current_font_has_glyph = function (codepoint)
- return font_has_glyph (font.current(), codepoint)
-end
-
-aux.current_font_has_glyph = current_font_has_glyph
-
-local do_if_glyph_else = function (chr, positive, negative)
- local codepoint = tonumber(chr)
- if not codepoint then codepoint = utf8.byte(chr) end
- if current_font_has_glyph(codepoint) then
- tex.sprint(positive)
- else
- tex.sprint(negative)
- end
-end
-
-aux.do_if_glyph_else = do_if_glyph_else
-
--[[doc--
This one is approximately “name_to_slot” from the microtype package;
@@ -184,9 +165,9 @@ aux.do_if_glyph_else = do_if_glyph_else
--doc]]--
---- string -> (int | false)
-local slot_of_name = function (glyphname)
- local fontdata = identifiers[font.current()]
+--- int -> string -> (int | false)
+local slot_of_name = function (font_id, glyphname)
+ local fontdata = identifiers[font_id]
if fontdata then
local unicode = fontdata.resources.unicodes[glyphname]
if unicode and type(unicode) == "number" then