summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv/font-vir.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv/font-vir.lua')
-rw-r--r--tex/context/base/mkiv/font-vir.lua23
1 files changed, 12 insertions, 11 deletions
diff --git a/tex/context/base/mkiv/font-vir.lua b/tex/context/base/mkiv/font-vir.lua
index 03ad7fc85..c3071cac0 100644
--- a/tex/context/base/mkiv/font-vir.lua
+++ b/tex/context/base/mkiv/font-vir.lua
@@ -14,7 +14,7 @@ if not modules then modules = { } end modules ['font-vir'] = {
--
-- vf.rule vf.special vf.right vf.push vf.down vf.char vf.node vf.fontid vf.pop vf.image vf.nop
-local next = next
+local next, setmetatable, getmetatable = next, setmetatable, getmetatable
local allocate = utilities.storage.allocate
local setmetatableindex = table.setmetatableindex
@@ -66,11 +66,7 @@ local combinations = { }
local combiner = { }
local whatever = allocate()
local helpers = allocate()
-local predefined = allocate {
- dummy = { "comment" },
- push = { "push" },
- pop = { "pop" },
-}
+local predefined = fonts.helpers.commands
methods.variants = variants -- todo .. wrong namespace
vf.combinations = combinations
@@ -110,8 +106,10 @@ local function combine_assign(g, name, from, to, start, force)
if not from then from, to = 0, 0xFF00 end
if not to then to = from end
if not start then start = from end
- local fc, gc = f.characters, g.characters
- local fd, gd = f.descriptions, g.descriptions
+ local fc = f.characters
+ local gc = g.characters
+ local fd = f.descriptions
+ local gd = g.descriptions
local hn = #g.fonts+1
g.fonts[hn] = { id = id } -- no need to be sparse
for i=from,to do
@@ -137,8 +135,10 @@ end
local function combine_names(g,name,force)
local f, id = constructors.readanddefine(name,g.specification.size)
if f and id then
- local fc, gc = f.characters, g.characters
- local fd, gd = f.descriptions, g.descriptions
+ local fc = f.characters
+ local gc = g.characters
+ local fd = f.descriptions
+ local gd = g.descriptions
g.fonts[#g.fonts+1] = { id = id } -- no need to be sparse
local hn = #g.fonts
for k, v in next, fc do
@@ -153,7 +153,8 @@ local function combine_names(g,name,force)
end
local combine_feature = function(g,v)
- local key, value = v[2], v[3]
+ local key = v[2]
+ local value = v[3]
if key then
if value == nil then
value = true