diff options
Diffstat (limited to 'tex/context/base/mkxl/math-vfu.lmt')
-rw-r--r-- | tex/context/base/mkxl/math-vfu.lmt | 70 |
1 files changed, 20 insertions, 50 deletions
diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt index 86d1fca0d..c1d45551b 100644 --- a/tex/context/base/mkxl/math-vfu.lmt +++ b/tex/context/base/mkxl/math-vfu.lmt @@ -85,7 +85,7 @@ local shared = { } local function brace(main,characters,id,size,unicode,first,rule,left,right,rule,last) if not characters[unicode] then characters[unicode] = { - hparts = { + parts = { { extender = 0, glyph = first }, { extender = 1, glyph = rule }, { extender = 0, glyph = left }, @@ -123,7 +123,7 @@ local function extension(main,characters,id,size,unicode,first,middle,last) if lw == 0 then lw = 1 end - chr.hparts = { + chr.parts = { { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw }, { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw }, { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw }, @@ -133,7 +133,7 @@ end local function parent(main,characters,id,size,unicode,first,rule,last) if not characters[unicode] then characters[unicode] = { - hparts = { + parts = { { extender = 0, glyph = first }, { extender = 1, glyph = rule }, { extender = 0, glyph = last }, @@ -668,13 +668,13 @@ local function copy_glyph(main,target,original,unicode,slot) break -- safeguard (when testing stuff) end end - local hv = olddata.hparts - if hv then - hv = fastcopy(hv) - newdata.hparts = hv - for i=1,#hv do - local hvi = hv[i] - local oldglyph = hvi.glyph + local pv = olddata.parts + if pv then + pv = fastcopy(pv) + newdata.parts = pv + for i=1,#hp do + local pvi = pv[i] + local oldglyph = pvi.glyph local olddata = original[oldglyph] local newdata = { width = olddata.width, @@ -683,25 +683,7 @@ local function copy_glyph(main,target,original,unicode,slot) tounicode = olddata.tounicode, commands = { { "slot", slot, oldglyph } }, } - hvi.glyph = addprivate(main,formatters["M-H-%H"](oldglyph),newdata) - end - end - local vv = olddata.vparts - if vv then - vv = fastcopy(vv) - newdata.vparts = vv - for i=1,#vv do - local vvi = vv[i] - local oldglyph = vvi.glyph - local olddata = original[oldglyph] - local newdata = { - width = olddata.width, - height = olddata.height, - depth = olddata.depth, - tounicode = olddata.tounicode, - commands = { { "slot", slot, oldglyph } }, - } - vvi.glyph = addprivate(main,formatters["M-V-%H"](oldglyph),newdata) + pvi.glyph = addprivate(main,formatters["M-P-%H"](oldglyph),newdata) end end local smaller = olddata.smaller @@ -1029,30 +1011,18 @@ function vfmath.define(specification,set,goodies) if n then t.next = offset + n elseif variants_done then - local vv = fci.vparts - if vv then - t.vparts = vv - end - local hv = fci.hparts - if hv then - t.hparts = hv + local v = fci.parts + if v then + t.parts = v end else - local vv = fci.vparts - if vv then - for i=1,#vv do - local vvi = vv[i] - vvi.glyph = vvi.glyph + offset - end - t.vparts = vv - end - local hv = fci.hparts - if hv then - for i=1,#hv do - local hvi = hv[i] - hvi.glyph = hvi.glyph + offset + local v = fci.parts + if v then + for i=1,#v do + local vi = v[i] + vi.glyph = vi.glyph + offset end - t.hparts = hv + t.parts = v end end characters[offset + index] = t |