diff options
Diffstat (limited to 'tex/context/base/mkxl/font-imp-math.lmt')
-rw-r--r-- | tex/context/base/mkxl/font-imp-math.lmt | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/tex/context/base/mkxl/font-imp-math.lmt b/tex/context/base/mkxl/font-imp-math.lmt index 079c867e2..277190f24 100644 --- a/tex/context/base/mkxl/font-imp-math.lmt +++ b/tex/context/base/mkxl/font-imp-math.lmt @@ -70,6 +70,35 @@ registerotffeature { -- A quick and dirty and low level implementation but okay for testing: +function fonts.helpers.mathscriptslots(tfmdata,textcode) + local rawdata = tfmdata.shared.rawdata + local rawresources = rawdata and rawdata.resources + local rawfeatures = rawresources and rawresources.features + local basesubstitutions = rawfeatures and rawfeatures.gsub + local sequences = basesubstitutions and tfmdata.resources.sequences + if sequences then + local characters = tfmdata.characters + if characters[textcode] then + for s=1,#sequences do + local sequence = sequences[s] + local sfeatures = sequence.features + if sfeatures and sfeatures.ssty then + local steps = sequence.steps + for i=1,#steps do + local coverage = steps[i].coverage + if coverage then + local okay = coverage[textcode] + if okay then + return okay + end + end + end + end + end + end + end +end + local function manipulate(tfmdata,key,value) if texconditionals["c_font_compact"] then local rawdata = tfmdata.shared.rawdata @@ -81,7 +110,7 @@ local function manipulate(tfmdata,key,value) if sequences then local characters = tfmdata.characters for s=1,#sequences do - local sequence = sequences[s] + local sequence = sequences[s] local sfeatures = sequence.features if sfeatures and sfeatures.ssty then local steps = sequence.steps |