diff options
Diffstat (limited to 'tex/context/base/math-ini.lua')
-rw-r--r-- | tex/context/base/math-ini.lua | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua index add198b21..0ecec8634 100644 --- a/tex/context/base/math-ini.lua +++ b/tex/context/base/math-ini.lua @@ -287,13 +287,24 @@ function mathematics.big(tfmdata,unicode,n) local t = tfmdata.characters local c = t[unicode] if c then - local next = c.next - while next do - if n <= 1 then - return next - else - n = n - 1 - next = t[next].next + local vv = c.vert_variants or c.next and t[c.next].vert_variants + if vv then + local vvn = vv[n] + return vvn and vvn.glyph or vv[#vv].glyph or unicode + else + local next = c.next + while next do + if n <= 1 then + return next + else + n = n - 1 + local tn = t[next].next + if tn then + next = tn + else + return next + end + end end end end |