summaryrefslogtreecommitdiff
path: root/tex/context/base/font-otd.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-04-11 18:00:19 +0300
committerMarius <mariausol@gmail.com>2011-04-11 18:00:19 +0300
commitdbbbbfac3d158709a07af8c26e68284d1b0ea202 (patch)
treeb9cb25022fc2858c0dcbc190ad466ba89c69861d /tex/context/base/font-otd.lua
parent7c7fe9c9e18355f42d0dba1b248235252728060b (diff)
downloadcontext-dbbbbfac3d158709a07af8c26e68284d1b0ea202.tar.gz
beta 2011.04.11 16:45
Diffstat (limited to 'tex/context/base/font-otd.lua')
-rw-r--r--tex/context/base/font-otd.lua18
1 files changed, 9 insertions, 9 deletions
diff --git a/tex/context/base/font-otd.lua b/tex/context/base/font-otd.lua
index 59c050e10..84811f0e1 100644
--- a/tex/context/base/font-otd.lua
+++ b/tex/context/base/font-otd.lua
@@ -25,6 +25,8 @@ local contextsetups = specifiers.contextsetups
local contextnumbers = specifiers.contextnumbers
local contextmerged = specifiers.contextmerged
+local setmetatableindex = table.setmetatableindex
+
local otffeatures = fonts.constructors.newfeatures("otf")
local registerotffeature = otffeatures.register
@@ -34,13 +36,11 @@ fonts.hashes.dynamics = fontdynamics
local a_to_script = { }
local a_to_language = { }
-setmetatable(fontdynamics, { __index =
- function(t,font)
- local d = fontdata[font].shared.dynamics or false
- t[font] = d
- return d
- end
-})
+setmetatableindex(fontdynamics, function(t,font)
+ local d = fontdata[font].shared.dynamics or false
+ t[font] = d
+ return d
+end)
function otf.setdynamics(font,attribute)
local features = contextsetups[contextnumbers[attribute]] -- can be moved to caller
@@ -206,11 +206,11 @@ function otf.dataset(tfmdata,sequences,font,attr)
if ra == nil then -- attr can be false
ra = { }
rl[attr] = ra
- setmetatable(ra, { __index = function(t,k)
+ setmetatableindex(ra, function(t,k)
local v = initialize(sequences[k],script,language,s_enabled,a_enabled,attr,dynamic)
t[k] = v
return v
- end})
+ end)
end
return ra