diff options
author | Marius <mariausol@gmail.com> | 2013-04-06 15:00:22 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-04-06 15:00:22 +0300 |
commit | 99c647f91806e9b73970a8e252af5a7974d5a57d (patch) | |
tree | 19306fbe23ad3b1617edda7c4aa47a9ac44a1ea9 /tex/context/base/font-ctx.lua | |
parent | d0342a37af2ced0e9b350e01ab3eaa2311f0cdb9 (diff) | |
download | context-99c647f91806e9b73970a8e252af5a7974d5a57d.tar.gz |
beta 2013.04.05 22:00
Diffstat (limited to 'tex/context/base/font-ctx.lua')
-rw-r--r-- | tex/context/base/font-ctx.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index deba4e49d..cb640b892 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -402,6 +402,8 @@ local function presetcontext(name,parent,features) -- will go to con and shared features[k] = v end end + else + -- just ignore an undefined one .. i.e. we can refer to not yet defined end end end @@ -659,8 +661,23 @@ end -- we need a copy as we will add (fontclass) goodies to the features and -- that is bad for a shared table +-- local function splitcontext(features) -- presetcontext creates dummy here +-- return fastcopy(setups[features] or (presetcontext(features,"","") and setups[features])) +-- end + local function splitcontext(features) -- presetcontext creates dummy here - return fastcopy(setups[features] or (presetcontext(features,"","") and setups[features])) + local sf = setups[features] + if not sf then + local n -- number + if find(features,",") then + -- let's assume a combination which is not yet defined but just specified (as in math) + n, sf = presetcontext(features,features,"") + else + -- we've run into an unknown feature and or a direct spec so we create a dummy + n, sf = presetcontext(features,"","") + end + end + return fastcopy(sf) end -- local splitter = lpeg.splitat("=") |