diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2010-11-03 03:45:20 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2010-11-03 03:52:31 +0200 |
commit | 430e36b5a723b307678070fd5b8597ab7c57a935 (patch) | |
tree | 486f1ad2035cea6698c0c550790e87bcd5d3ff13 /otfl-font-ott.lua | |
parent | f089d7c2866791b5b48c07fe6a6c001727ca50c1 (diff) | |
download | luaotfload-430e36b5a723b307678070fd5b8597ab7c57a935.tar.gz |
Sync with context 2010.11.01
Not tested, yet.
Diffstat (limited to 'otfl-font-ott.lua')
-rw-r--r-- | otfl-font-ott.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/otfl-font-ott.lua b/otfl-font-ott.lua index a5a0df3..ec915b8 100644 --- a/otfl-font-ott.lua +++ b/otfl-font-ott.lua @@ -638,9 +638,18 @@ local baselines = allocate { ['romn'] = 'Roman baseline' } -local verbosescripts = allocate(table.swaphash(scripts )) -local verboselanguages = allocate(table.swaphash(languages)) -local verbosefeatures = allocate(table.swaphash(features )) + +local function swap(h) -- can be a tables.swap when we get a better name + local r = { } + for k, v in next, h do + r[v] = lower(gsub(k," ","")) + end + return r +end + +local verbosescripts = allocate(swap(scripts )) +local verboselanguages = allocate(swap(languages)) +local verbosefeatures = allocate(swap(features )) tables.scripts = scripts tables.languages = languages @@ -661,12 +670,6 @@ for k, v in next, verbosefeatures do verbosefeatures[lower(k)] = v end --- can be sped up by local tables - -function tables.totag(id) -- not used - return format("%4s",lower(id)) -end - local function resolve(tab,id) if tab and id then id = lower(id) |