summaryrefslogtreecommitdiff
path: root/otfl-font-ott.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-05-09 18:19:57 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-05-09 18:20:13 +0300
commit2d1908ff97890f3a0e7cae39dd99e7b97ff2d443 (patch)
treea9b1bfdb02f75b1af09fb3c057465e90f0b64ecc /otfl-font-ott.lua
parentf80559dee34d3e2c01f5793541e1c6fb4b6b641b (diff)
downloadluaotfload-2d1908ff97890f3a0e7cae39dd99e7b97ff2d443.tar.gz
Updating to latest ConTeXt stable (2010.05.08)
Diffstat (limited to 'otfl-font-ott.lua')
-rw-r--r--otfl-font-ott.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/otfl-font-ott.lua b/otfl-font-ott.lua
index 55cb734..d26c55f 100644
--- a/otfl-font-ott.lua
+++ b/otfl-font-ott.lua
@@ -682,6 +682,14 @@ for k, v in pairs(to_features) do
to_features[lower(k)] = v
end
+otf.meanings.checkers = {
+ rand = function(v)
+ return v and "random"
+ end
+}
+
+local checkers = otf.meanings.checkers
+
function otf.meanings.normalize(features)
local h = { }
for k,v in next, features do
@@ -710,7 +718,9 @@ function otf.meanings.normalize(features)
v = b
end
end
- h[to_features[k] or k] = v
+ k = to_features[k] or k
+ local c = checkers[k]
+ h[k] = c and c(v) or v
end
end
return h