diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-02 17:15:08 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2016-03-02 17:15:08 +0100 |
commit | 62676780b4363d25d7a247f39484b1e4a34ef7b7 (patch) | |
tree | 8678e13eee0b805e7c972b9885f21b9747493ee4 /tex/context/base/mkiv | |
parent | 2a958dcf22dd71ba1e4408648676d44c16d7e3bf (diff) | |
download | context-62676780b4363d25d7a247f39484b1e4a34ef7b7.tar.gz |
2016-03-02 16:58:00
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/cldf-ini.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-otc.lua | 42 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-otn.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-ots.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/font-tfm.lua | 3 | ||||
-rw-r--r-- | tex/context/base/mkiv/l-lua.lua | 14 | ||||
-rw-r--r-- | tex/context/base/mkiv/luat-mac.lua | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 8977 -> 8976 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 267251 -> 266024 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/strc-not.lua | 3 | ||||
-rw-r--r-- | tex/context/base/mkiv/symb-run.mkiv | 16 | ||||
-rw-r--r-- | tex/context/base/mkiv/typo-krn.lua | 12 |
14 files changed, 57 insertions, 45 deletions
diff --git a/tex/context/base/mkiv/cldf-ini.lua b/tex/context/base/mkiv/cldf-ini.lua index 4da01e8e1..0c39f72f5 100644 --- a/tex/context/base/mkiv/cldf-ini.lua +++ b/tex/context/base/mkiv/cldf-ini.lua @@ -193,7 +193,7 @@ local registerfunction, unregisterfunction, reservefunction, knownfunctions, cal local f_resolve = nil local p_resolve = ((1-lpegP("."))^1 / function(s) f_resolve = f_resolve[s] end * lpegP(".")^0)^1 - function resolvestoredfunction(str) + local function resolvestoredfunction(str) f_resolve = global lpegmatch(p_resolve,str) return f_resolve diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index ea60d4a45..8687bf616 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.03.01 14:03} +\newcontextversion{2016.03.02 16:55} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 44d760fb3..d8a2e57de 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.03.01 14:03} +\edef\contextversion{2016.03.02 16:55} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/font-otc.lua b/tex/context/base/mkiv/font-otc.lua index 0cc7b58b0..d4c98d6fc 100644 --- a/tex/context/base/mkiv/font-otc.lua +++ b/tex/context/base/mkiv/font-otc.lua @@ -60,14 +60,6 @@ local function addfeature(data,feature,specifications) return end -- feature has to be unique but the name entry wins eventually - -- local gsubfeatures = features.gsub - -- if gsubfeatures and gsubfeatures[feature] then - -- return -- already present - -- end - -- local gposfeatures = features.gpos - -- if gposfeatures and gposfeatures[feature] then - -- return -- already present - -- end -- todo alse gpos @@ -454,6 +446,9 @@ local function addfeature(data,feature,specifications) elseif featuretype == "chainposition" then category = "gpos" coverage = prepare_chain(list,featuretype,sublookups) + else + report_otf("not registering feature %a, unknown category",feature) + return end if coverage and next(coverage) then nofsteps = nofsteps + 1 @@ -487,28 +482,17 @@ local function addfeature(data,feature,specifications) insert(sequences,sequence) end -- register in metadata (merge as there can be a few) - local k = nil - if category == "gpos" then - if not gposfeatures then - gposfeatures = { } - fontfeatures.gpos = gposfeatures - end - k = gposfeatures[feature] - if not k then - k = { } - gposfeatures[feature] = k - end - else - if not gsubfeatures then - gsubfeatures = { } - fontfeatures.gsub = gsubfeatures - end - k = gsubfeatures[feature] - if not k then - k = { } - gsubfeatures[feature] = k - end + local features = fontfeatures[category] + if not features then + features = { } + fontfeatures[category] = features + end + local k = features[feature] + if not k then + k = { } + features[feature] = k end + -- for script, languages in next, askedfeatures do local kk = k[script] if not kk then diff --git a/tex/context/base/mkiv/font-otn.lua b/tex/context/base/mkiv/font-otn.lua index 8815f2a14..e1228d004 100644 --- a/tex/context/base/mkiv/font-otn.lua +++ b/tex/context/base/mkiv/font-otn.lua @@ -2709,7 +2709,7 @@ local handle_contextchain = nil -- normal_handle_contextchain(head,start,kind,chainname,contexts,sequence,lookuphash) -function chained_contextchain(head,start,stop,...) +local function chained_contextchain(head,start,stop,...) local steps = currentlookup.steps local nofsteps = currentlookup.nofsteps if nofsteps > 1 then diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua index 5cbdbab23..e2cccebe8 100644 --- a/tex/context/base/mkiv/font-ots.lua +++ b/tex/context/base/mkiv/font-ots.lua @@ -2713,7 +2713,7 @@ handlers.gpos_context = handle_contextchain -- this needs testing -function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode) +local function chained_contextchain(head,start,stop,dataset,sequence,currentlookup,rlmode) local steps = currentlookup.steps local nofsteps = currentlookup.nofsteps if nofsteps > 1 then diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua index 2dd576849..83ac2f0d8 100644 --- a/tex/context/base/mkiv/font-tfm.lua +++ b/tex/context/base/mkiv/font-tfm.lua @@ -34,6 +34,7 @@ local registertfmfeature = tfmfeatures.register constructors.resolvevirtualtoo = false -- wil be set in font-ctx.lua fonts.formats.tfm = "type1" -- we need to have at least a value here +fonts.formats.ofm = "type1" -- we need to have at least a value here --[[ldx-- <p>The next function encapsulates the standard <l n='tfm'/> loader as @@ -196,3 +197,5 @@ function readers.tfm(specification) end return check_tfm(specification,fullname) end + +readers.ofm = readers.tfm diff --git a/tex/context/base/mkiv/l-lua.lua b/tex/context/base/mkiv/l-lua.lua index cb6182907..b90f37e3d 100644 --- a/tex/context/base/mkiv/l-lua.lua +++ b/tex/context/base/mkiv/l-lua.lua @@ -19,12 +19,20 @@ if not modules then modules = { } end modules ['l-lua'] = { -- compatibility hacksand helpers -local major, minor = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") +_MAJORVERSION, _MINORVERSION = string.match(_VERSION,"^[^%d]+(%d+)%.(%d+).*$") -_MAJORVERSION = tonumber(major) or 5 -_MINORVERSION = tonumber(minor) or 1 +_MAJORVERSION = tonumber(_MAJORVERSION) or 5 +_MINORVERSION = tonumber(_MINORVERSION) or 1 _LUAVERSION = _MAJORVERSION + _MINORVERSION/10 +if _LUAVERSION < 5.2 and jit then + -- + -- we want loadstring cum suis to behave like 5.2 + -- + _MINORVERSION = 2 + _LUAVERSION = 5.2 +end + -- lpeg if not lpeg then diff --git a/tex/context/base/mkiv/luat-mac.lua b/tex/context/base/mkiv/luat-mac.lua index 6214e591e..4274fe9f9 100644 --- a/tex/context/base/mkiv/luat-mac.lua +++ b/tex/context/base/mkiv/luat-mac.lua @@ -41,7 +41,7 @@ local function set(s) h = rep("#",2^(ns-1)) hashes[ns] = h end - m = h .. n + local m = h .. n top[s] = m return m end diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex ed06b4547..e84b45754 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex a8fc8f408..adb87eeaa 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf diff --git a/tex/context/base/mkiv/strc-not.lua b/tex/context/base/mkiv/strc-not.lua index 024366438..ddbd2ae06 100644 --- a/tex/context/base/mkiv/strc-not.lua +++ b/tex/context/base/mkiv/strc-not.lua @@ -313,7 +313,8 @@ local function getdeltapage(tag,n) local references = li.references if references then -- local symb = structures.references.collected[""]["symb:"..tag..":"..n] - local symb = structures.references.collected[""]["*"..(references.internal or 0)] + local rymb = structures.references.collected[""] + local symb = rymb and rymb["*"..(references.internal or 0)] local notepage = references.realpage or 0 local symbolpage = symb and symb.references.realpage or -1 if trace_references then diff --git a/tex/context/base/mkiv/symb-run.mkiv b/tex/context/base/mkiv/symb-run.mkiv index de17201c3..ed4d90861 100644 --- a/tex/context/base/mkiv/symb-run.mkiv +++ b/tex/context/base/mkiv/symb-run.mkiv @@ -19,7 +19,7 @@ context.start() context.forcesymbolset { collection } context.starttabulate { "|lT|l|l|" } - local option = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay } + local options = { framecolor = "orange", rulethickness = ".8pt", offset = interfaces.variables.overlay } for i=1,#symbols do local symbol = symbols[i] context.NC() @@ -44,4 +44,16 @@ \gdef\symb_show_set[#1]% {\ctxcommand{showsymbolset("#1","\symbolset{#1}")}} -\protect \endinput +\protect + +\continueifinputfile{symb-run.mkiv} + +\usesymbols[cc] + +\starttext + + \showsymbolset[cc] + + \symbol[cc][cc-by-sa-nc] + +\stoptext diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua index cdb0a786c..9bf4a5a3b 100644 --- a/tex/context/base/mkiv/typo-krn.lua +++ b/tex/context/base/mkiv/typo-krn.lua @@ -243,7 +243,8 @@ local function inject_begin(boundary,prev,keeptogether,krn,ok) -- prev is a glyp if charone > 0 then local font = getfont(boundary) local chartwo = getchar(boundary) - local kerns = chardata[font][charone].kerns + local data = chardata[font][charone] + local kerns = data and data.kerns local kern = new_kern((kerns and kerns[chartwo] or 0) + quaddata[font]*krn) setlink(kern,boundary) return kern, true @@ -280,7 +281,8 @@ local function inject_end(boundary,next,keeptogether,krn,ok) if charone > 0 then local font = getfont(tail) local chartwo = getchar(next) - local kerns = chardata[font][charone].kerns + local data = chardata[font][charone] + local kerns = data and data.kerns local kern = (kerns and kerns[chartwo] or 0) + quaddata[font]*krn insert_node_after(boundary,tail,new_kern(kern)) return boundary, true @@ -329,7 +331,8 @@ local function process_list(head,keeptogether,krn,font,okay) -- keep 'm else local prevchar = getchar(prev) - local kerns = chardata[font][prevchar].kerns + local data = chardata[font][prevchar] + local kerns = data and data.kerns -- if kerns then -- print("it happens indeed, basemode kerns not yet injected") -- end @@ -446,7 +449,8 @@ function kerns.handler(head) if keeptogether and keeptogether(prev,start) then -- keep 'm else - local kerns = chardata[font][prevchar].kerns + local data = chardata[font][prevchar] + local kerns = data and data.kerns local kern = (kerns and kerns[char] or 0) + quaddata[font]*krn insert_node_before(head,start,kern_injector(fillup,kern)) done = true |