diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-07-10 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-07-10 00:15:04 +0200 |
commit | d0cd2c4b5b931a812990db3ac953a3e288d0c215 (patch) | |
tree | 66f585bbfae40fdd2e748a308555d96e2fa54365 /tex/context/base/font-oth.lua | |
parent | d7b51cfffa3d797c9a19d6cf5366150bcf032554 (diff) | |
download | context-d0cd2c4b5b931a812990db3ac953a3e288d0c215.tar.gz |
2015-07-10 00:08:00
Diffstat (limited to 'tex/context/base/font-oth.lua')
-rw-r--r-- | tex/context/base/font-oth.lua | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/tex/context/base/font-oth.lua b/tex/context/base/font-oth.lua index 59dca31d9..28c543494 100644 --- a/tex/context/base/font-oth.lua +++ b/tex/context/base/font-oth.lua @@ -6,46 +6,4 @@ if not modules then modules = { } end modules ['font-oth'] = { license = "see context related readme files" } -local fonts = fonts -local otf = fonts.handlers.otf - --- todo: use nodemode data is available - -function otf.getalternate(tfmdata,k,kind,value) -- just initialize nodemode and use that (larger mem print) - if value then - local description = tfmdata.descriptions[k] - if description then - local slookups = description.slookups -- we assume only slookups (we can always extend) - if slookups then - local shared = tfmdata.shared - local rawdata = shared and shared.rawdata - if rawdata then - local lookuptypes = rawdata.resources.lookuptypes - if lookuptypes then - local properties = tfmdata.properties - -- we could cache these - local validlookups, lookuplist = otf.collectlookups(rawdata,kind,properties.script,properties.language) - if validlookups then - local choice = tonumber(value) or 1 -- no random here (yet) - for l=1,#lookuplist do - local lookup = lookuplist[l] - local found = slookups[lookup] - if found then - local lookuptype = lookuptypes[lookup] - if lookuptype == "substitution" then - return found - elseif lookuptype == "alternate" then - return found[choice] or found[#found] - else - -- ignore - end - end - end - end - end - end - end - end - end - return k -end +-- otf.getalternate is moved elsewhere (for now) but move back here some day |