From 99c647f91806e9b73970a8e252af5a7974d5a57d Mon Sep 17 00:00:00 2001 From: Marius Date: Sat, 6 Apr 2013 15:00:22 +0300 Subject: beta 2013.04.05 22:00 --- tex/context/base/font-ctx.lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'tex/context/base/font-ctx.lua') 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("=") -- cgit v1.2.3