summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-01-15 08:42:56 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2010-01-15 09:24:45 +0200
commit6deb8a8d311b48e4a7f3ab0010e7e535b38620ff (patch)
tree74db06118c59189a6857a919fb31aa6aef63629d
parent4962a4a9bc747e2ba62331c652a1802922509365 (diff)
downloadluaotfload-6deb8a8d311b48e4a7f3ab0010e7e535b38620ff.tar.gz
Updating to latest ConTeXt beta 2010.01.14
Fixes bug with some fonts ("attempt to get length of local 'splt' (a nil value)").
-rw-r--r--otfl-font-otf.lua39
-rw-r--r--otfl-font-tfm.lua2
2 files changed, 24 insertions, 17 deletions
diff --git a/otfl-font-otf.lua b/otfl-font-otf.lua
index 395fe44..75eb361 100644
--- a/otfl-font-otf.lua
+++ b/otfl-font-otf.lua
@@ -84,7 +84,7 @@ otf.features.default = otf.features.default or { }
otf.enhancers = otf.enhancers or { }
otf.glists = { "gsub", "gpos" }
-otf.version = 2.642 -- beware: also sync font-mis.lua
+otf.version = 2.643 -- beware: also sync font-mis.lua
otf.pack = true -- beware: also sync font-mis.lua
otf.syncspace = true
otf.notdef = false
@@ -530,6 +530,7 @@ otf.enhancers["analyse unicodes"] = function(data,filename)
end
local cidinfo, cidnames, cidcodes = data.cidinfo
local usedmap = cidinfo and cidinfo.usedname
+ usedmap = usedmap and lower(usedmap)
usedmap = usedmap and fonts.cid.map[usedmap]
if usedmap then
oparser = usedmap and fonts.map.make_name_parser(cidinfo.ordering)
@@ -551,7 +552,9 @@ otf.enhancers["analyse unicodes"] = function(data,filename)
local foundindex = lpegmatch(oparser,name)
if foundindex then
unicode = cidcodes[foundindex] -- name to number
- if not unicode then
+ if unicode then
+ originals[index], tounicode[index], ns = unicode, tounicode16(unicode), ns + 1
+ else
local reference = cidnames[foundindex] -- number to name
if reference then
local foundindex = lpegmatch(oparser,reference)
@@ -1219,13 +1222,15 @@ otf.enhancers["reorganize kerns"] = function(data,filename)
local offset = offsets[baseoffset + sk]
--~ local offset = offsets[sk] -- (fk-1) * maxseconds + sk]
local splt = split[sv]
- for i=1,#splt do
- local second_unicode = splt[i]
- if tonumber(second_unicode) then
- lookupkerns[second_unicode] = offset
- else
- for s=1,#second_unicode do
- lookupkerns[second_unicode[s]] = offset
+ if splt then
+ for i=1,#splt do
+ local second_unicode = splt[i]
+ if tonumber(second_unicode) then
+ lookupkerns[second_unicode] = offset
+ else
+ for s=1,#second_unicode do
+ lookupkerns[second_unicode[s]] = offset
+ end
end
end
end
@@ -1237,13 +1242,15 @@ otf.enhancers["reorganize kerns"] = function(data,filename)
for fk=1,#firsts do
local fv = firsts[fk]
local splt = split[fv]
- for i=1,#splt do
- local first_unicode = splt[i]
- if tonumber(first_unicode) then
- do_it(fk,first_unicode)
- else
- for f=1,#first_unicode do
- do_it(fk,first_unicode[f])
+ if splt then
+ for i=1,#splt do
+ local first_unicode = splt[i]
+ if tonumber(first_unicode) then
+ do_it(fk,first_unicode)
+ else
+ for f=1,#first_unicode do
+ do_it(fk,first_unicode[f])
+ end
end
end
end
diff --git a/otfl-font-tfm.lua b/otfl-font-tfm.lua
index 4bb47cf..c5140ff 100644
--- a/otfl-font-tfm.lua
+++ b/otfl-font-tfm.lua
@@ -487,7 +487,7 @@ t.colorscheme = tfmtable.colorscheme
--~ end
local s = sharedkerns[vk]
if not s then
- local s = {}
+ s = { }
for k,v in next, vk do s[k] = v*hdelta end
sharedkerns[vk] = s
end