summaryrefslogtreecommitdiff
path: root/otfl-font-def.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-11-03 03:45:20 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-11-03 03:52:31 +0200
commit430e36b5a723b307678070fd5b8597ab7c57a935 (patch)
tree486f1ad2035cea6698c0c550790e87bcd5d3ff13 /otfl-font-def.lua
parentf089d7c2866791b5b48c07fe6a6c001727ca50c1 (diff)
downloadluaotfload-430e36b5a723b307678070fd5b8597ab7c57a935.tar.gz
Sync with context 2010.11.01
Not tested, yet.
Diffstat (limited to 'otfl-font-def.lua')
-rw-r--r--otfl-font-def.lua17
1 files changed, 10 insertions, 7 deletions
diff --git a/otfl-font-def.lua b/otfl-font-def.lua
index aac69ed..e87fee4 100644
--- a/otfl-font-def.lua
+++ b/otfl-font-def.lua
@@ -170,14 +170,15 @@ local sortedhashkeys = table.sortedhashkeys
function tfm.hashfeatures(specification)
local features = specification.features
if features then
- local t = { }
+ local t, tn = { }, 0
local normal = features.normal
if normal and next(normal) then
local f = sortedhashkeys(normal)
for i=1,#f do
local v = f[i]
if v ~= "number" and v ~= "features" then -- i need to figure this out, features
- t[#t+1] = v .. '=' .. tostring(normal[v])
+ tn = tn + 1
+ t[tn] = v .. '=' .. tostring(normal[v])
end
end
end
@@ -186,13 +187,15 @@ function tfm.hashfeatures(specification)
local f = sortedhashkeys(vtf)
for i=1,#f do
local v = f[i]
- t[#t+1] = v .. '=' .. tostring(vtf[v])
+ tn = tn + 1
+ t[tn] = v .. '=' .. tostring(vtf[v])
end
end
---~ if specification.mathsize then
---~ t[#t+1] = "mathsize=" .. specification.mathsize
---~ end
- if #t > 0 then
+ --~ if specification.mathsize then
+ --~ tn = tn + 1
+ --~ t[tn] = "mathsize=" .. specification.mathsize
+ --~ end
+ if tn > 0 then
return concat(t,"+")
end
end