diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-07-17 01:36:30 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-07-17 01:36:30 +0200 |
commit | f7bfb1deb04d4ad101dbabf4d635d33cd98aa0a1 (patch) | |
tree | 2ac61b4da45fc7f989154cd6a60fb075e6bee587 /tex/generic | |
parent | f5566ab29fc08e71f6da12003ae49c48461bb70a (diff) | |
download | context-f7bfb1deb04d4ad101dbabf4d635d33cd98aa0a1.tar.gz |
2017-07-17 00:26:00
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 1557ce22d..a8a7889ca 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 07/16/17 12:08:43 +-- merge date : 07/17/17 00:20:46 do -- begin closure to overcome local limits and interference @@ -18508,7 +18508,7 @@ function readers.pack(data) step.coverage=pack_normal(c) else for g1,d1 in next,c do - if d1~=true then + if d1 and d1~=true then c[g1]=pack_indexed(d1) end end @@ -19376,6 +19376,28 @@ function readers.compact(data) report("%i steps of %i steps turned from pairs into kerns",kerned,allsteps) end end +local function mergesteps(t,k) + if k=="merged" then + local merged={} + for i=1,#t do + local step=t[i] + local coverage=step.coverage + for k in next,coverage do + local m=merged[k] + if m then + m[2]=i + else + merged[k]={ i,i } + end + end + end + t.merged=merged + return merged + end +end +if fonts.helpers then + fonts.helpers.mergesteps=mergesteps +end function readers.expand(data) if not data or data.expanded then return @@ -19414,25 +19436,6 @@ function readers.expand(data) end end end - local function mergesteps(t,k) - if k=="merged" then - local merged={} - for i=1,#t do - local step=t[i] - local coverage=step.coverage - for k in next,coverage do - local m=merged[k] - if m then - m[2]=i - else - merged[k]={ i,i } - end - end - end - t.merged=merged - return merged - end - end local function expandlookups(sequences) if sequences then for i=1,#sequences do @@ -29107,7 +29110,7 @@ local function addfeature(data,feature,specifications) end return coverage end - local prepare_single=prepare_pair + local prepare_single=prepare_pair local function prepare_chain(list,featuretype,sublookups) local rules=list.rules local coverage={} @@ -29332,6 +29335,7 @@ local function addfeature(data,feature,specifications) steps[nofsteps]=register(coverage,featuretype,format,feature,nofsteps,descriptions,resources) end end + setmetatableindex(steps,fonts.helpers.mergesteps) s[i]={ [stepkey]=steps, nofsteps=nofsteps, @@ -29390,6 +29394,7 @@ local function addfeature(data,feature,specifications) askedfeatures[k]=tohash(v) end end + setmetatableindex(steps,fonts.helpers.mergesteps) if featureflags[1] then featureflags[1]="mark" end if featureflags[2] then featureflags[2]="ligature" end if featureflags[3] then featureflags[3]="base" end |