diff options
Diffstat (limited to 'tex/context/base/mkxl/font-dsp.lmt')
-rw-r--r-- | tex/context/base/mkxl/font-dsp.lmt | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/tex/context/base/mkxl/font-dsp.lmt b/tex/context/base/mkxl/font-dsp.lmt index 0cb05786b..1b54bf463 100644 --- a/tex/context/base/mkxl/font-dsp.lmt +++ b/tex/context/base/mkxl/font-dsp.lmt @@ -1186,25 +1186,30 @@ local function chainedcontext(f,fontdata,lookupid,lookupoffset,offset,glyphs,nof rules = rules, } elseif subtype == 3 then + -- Maybe this one needs checking. Anyway zero current is bad. local before = readarray(f) local current = readarray(f) local after = readarray(f) local noflookups = readushort(f) - local lookups = readlookuparray(f,noflookups,#current) - before = readcoveragearray(f,tableoffset,before,true) - current = readcoveragearray(f,tableoffset,current,true) - after = readcoveragearray(f,tableoffset,after,true) - return { - format = "coverage", - rules = { - { - before = before, - current = current, - after = after, - lookups = lookups, + local lookups = current and readlookuparray(f,noflookups,#current) + if lookups then + before = readcoveragearray(f,tableoffset,before,true) + current = readcoveragearray(f,tableoffset,current,true) + after = readcoveragearray(f,tableoffset,after,true) + return { + format = "coverage", + rules = { + { + before = before, + current = current, + after = after, + lookups = lookups, + } } } - } + else + report("confusing subtype %a in %a %s",subtype,"chainedcontext",what) + end else report("unsupported subtype %a in %a %s",subtype,"chainedcontext",what) end |