diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/catc-act.mkii | 6 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkii | 2 | ||||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/font-afm.lua | 6 | ||||
-rw-r--r-- | tex/context/base/font-def.lua | 8 | ||||
-rw-r--r-- | tex/context/base/font-ini.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/font-mis.lua | 2 | ||||
-rw-r--r-- | tex/context/base/font-otf.lua | 13 | ||||
-rw-r--r-- | tex/context/base/font-otn.lua | 3 | ||||
-rw-r--r-- | tex/context/base/l-unicode.lua | 28 | ||||
-rw-r--r-- | tex/context/base/lpdf-fmt.lua | 2 | ||||
-rw-r--r-- | tex/context/base/node-ini.lua | 30 | ||||
-rw-r--r-- | tex/context/base/node-ser.lua | 8 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23559 -> 23568 bytes | |||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 26 |
17 files changed, 97 insertions, 45 deletions
diff --git a/tex/context/base/catc-act.mkii b/tex/context/base/catc-act.mkii index 2cde28e44..41b7e8b98 100644 --- a/tex/context/base/catc-act.mkii +++ b/tex/context/base/catc-act.mkii @@ -58,8 +58,8 @@ \def\makecharacteractive #1 {\catcode`#1\active} -\def\installanddefineactivecharacter #1 % #2% - {\normalexpanded{\noexpand\installactivecharacter \utfchar{#1} }% - \defineactivecharacter #1 }% {#2}} +% \def\installanddefineactivecharacter #1 % #2% +% {\normalexpanded{\noexpand\installactivecharacter \utfchar{#1} }% wrong +% \defineactivecharacter #1 }% {#2}} \endinput diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index da77b2d41..5937cabe3 100644 --- a/tex/context/base/cont-new.mkii +++ b/tex/context/base/cont-new.mkii @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.03.28 01:03} +\newcontextversion{2011.03.28 18:59} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 9d1974169..24d53b738 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2011.03.28 01:03} +\newcontextversion{2011.03.28 18:59} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii index 51872541a..09516c038 100644 --- a/tex/context/base/context.mkii +++ b/tex/context/base/context.mkii @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.03.28 01:03} +\edef\contextversion{2011.03.28 18:59} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index e0b699271..46b6c21d0 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2011.03.28 01:03} +\edef\contextversion{2011.03.28 18:59} %D For those who want to use this: diff --git a/tex/context/base/font-afm.lua b/tex/context/base/font-afm.lua index 09cd64491..b719a9b31 100644 --- a/tex/context/base/font-afm.lua +++ b/tex/context/base/font-afm.lua @@ -27,7 +27,7 @@ local report_afm = logs.reporter("fonts","afm loading") local next, type, tonumber = next, type, tonumber local format, match, gmatch, lower, gsub, strip = string.format, string.match, string.gmatch, string.lower, string.gsub, string.strip local abs = math.abs -local P, S, C, R, lpegmatch = lpeg.P, lpeg.S, lpeg.C, lpeg.R, lpeg.match +local P, S, C, R, lpegmatch, patterns = lpeg.P, lpeg.S, lpeg.C, lpeg.R, lpeg.match, lpeg.patterns local fonts = fonts local afm = { } @@ -90,8 +90,8 @@ built in <l n='tfm'/> and <l n='otf'/> reader.</p> --~ Comment AXISHEIGHT 250 local comment = P("Comment") -local spacing = S(" \t")^1 -local lineend = S("\n\r") +local spacing = patterns.spacer -- S(" \t")^1 +local lineend = patterns.newline -- S("\n\r") local words = C((1 - lineend)^1) local number = C((R("09") + S("."))^1) / tonumber * spacing^0 local data = lpeg.Carg(1) diff --git a/tex/context/base/font-def.lua b/tex/context/base/font-def.lua index ec9a059df..c4904aa39 100644 --- a/tex/context/base/font-def.lua +++ b/tex/context/base/font-def.lua @@ -214,9 +214,11 @@ function definers.resolve(specification) -- for the moment here (goodies set outside features) local goodies = specification.goodies if goodies and goodies ~= "" then - local normalgoodies = specification.features.normal.goodies - if not normalgoodies or normalgoodies == "" then - specification.features.normal.goodies = goodies + local normal = specification.features.normal + if not normal then + specification.features.normal = { goodies = goodies } + elseif not normal.goodies then + normal.goodies = goodies end end -- diff --git a/tex/context/base/font-ini.mkiv b/tex/context/base/font-ini.mkiv index 21b971a9b..e8c2ee8af 100644 --- a/tex/context/base/font-ini.mkiv +++ b/tex/context/base/font-ini.mkiv @@ -769,7 +769,7 @@ \edef\somefontspec{at \number\scaledfontsize sp}% we need the resolved designsize (for fallbacks) \expandafter\let\expandafter\lastrawfontcall\csname#2\endcsname \the\everydefinefont - \setnewconstant\featureinheritancemode\featureinheritancedefault} + \featureinheritancemode\featureinheritancedefault} \def\updatefontclassparameters {\edef\@@fontclassfeatures {\ifcsname\fontclass\fontstyle\s!features \endcsname\csname\fontclass\fontstyle\s!features \endcsname\fi}% diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua index c92eba6b5..368eb4b9e 100644 --- a/tex/context/base/font-mis.lua +++ b/tex/context/base/font-mis.lua @@ -22,7 +22,7 @@ local handlers = fonts.handlers handlers.otf = handlers.otf or { } local otf = handlers.otf -otf.version = otf.version or 2.720 +otf.version = otf.version or 2.721 otf.cache = otf.cache or containers.define("fonts", "otf", otf.version, true) function otf.loadcached(filename,format,sub) diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index 6c36bf104..65b868045 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/font-otf.lua @@ -47,7 +47,7 @@ local otf = fonts.handlers.otf otf.glists = { "gsub", "gpos" } -otf.version = 2.720 -- beware: also sync font-mis.lua +otf.version = 2.721 -- beware: also sync font-mis.lua otf.cache = containers.define("fonts", "otf", otf.version, true) local fontdata = fonts.hashes.identifiers @@ -610,7 +610,7 @@ actions["prepare glyphs"] = function(data,filename,raw) local subfont = rawsubfonts[cidindex] local cidglyphs = subfont.glyphs metadata.subfonts[cidindex] = somecopy(subfont) - for index=0,subfont.glyphmax - 1 do + for index=0,subfont.glyphcnt-1 do -- we could take the previous glyphcnt instead of 0 local glyph = cidglyphs[index] if glyph then local unicode = glyph.unicode @@ -648,6 +648,8 @@ actions["prepare glyphs"] = function(data,filename,raw) } descriptions[unicode] = description + else + -- report_otf("potential problem: glyph 0x%04X is used but empty",index) end end end @@ -663,14 +665,11 @@ actions["prepare glyphs"] = function(data,filename,raw) else - for index=0,raw.glyphmax-1 do + for index=0,raw.glyphcnt-1 do -- not raw.glyphmax-1 (as that will crash) local glyph = rawglyphs[index] ---~ report_otf("1: 0x%04X: %s",index,tostring(glyph)) io.flush() if glyph then local unicode = glyph.unicode ---~ report_otf("2: 0x%04X: %s",index,tostring(unicode)) io.flush() local name = glyph.name ---~ report_otf("3: 0x%04X: %s",index,tostring(name)) io.flush() if not unicode or unicode == -1 or unicode >= criterium then unicode = private unicodes[name] = private @@ -693,6 +692,8 @@ actions["prepare glyphs"] = function(data,filename,raw) index = index, glyph = glyph, } + else + report_otf("potential problem: glyph 0x%04X is used but empty",index) end end diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index 38d01dec0..a5de4ea46 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -778,7 +778,6 @@ end function handlers.gpos_single(start,kind,lookupname,kerns,sequence) local startchar = start.char - local kerns = kerns[start.char] local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,characters[startchar]) if trace_kerns then logprocess("%s: shifting single %s by (%s,%s) and correction (%s,%s)",pref(kind,lookupname),gref(startchar),dx,dy,w,h) @@ -1420,7 +1419,7 @@ function chainprocs.gpos_single(start,stop,kind,chainname,currentcontext,lookuph local lookupname = subtables[1] local kerns = lookuphash[lookupname] if kerns then - kerns = kerns[startchar] + kerns = kerns[startchar] -- needed ? if kerns then local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,characters[startchar]) if trace_kerns then diff --git a/tex/context/base/l-unicode.lua b/tex/context/base/l-unicode.lua index 73ffbae48..b64969162 100644 --- a/tex/context/base/l-unicode.lua +++ b/tex/context/base/l-unicode.lua @@ -16,13 +16,31 @@ if not unicode then if n < 0x80 then return char(n) elseif n < 0x800 then - return char(0xC0 + floor(n/0x40)) .. char(0x80 + (n % 0x40)) + return char( + 0xC0 + floor(n/0x40), + 0x80 + (n % 0x40) + ) elseif n < 0x10000 then - return char(0xE0 + floor(n/0x1000)) .. char(0x80 + (floor(n/0x40) % 0x40)) .. char(0x80 + (n % 0x40)) + return char( + 0xE0 + floor(n/0x1000), + 0x80 + (floor(n/0x40) % 0x40), + 0x80 + (n % 0x40) + ) elseif n < 0x40000 then - return char(0xF0 + floor(n/0x40000)) .. char(0x80 + floor(n/0x1000)) .. char(0x80 + (floor(n/0x40) % 0x40)) .. char(0x80 + (n % 0x40)) - else -- wrong: - -- return char(0xF1 + floor(n/0x1000000)) .. char(0x80 + floor(n/0x40000)) .. char(0x80 + floor(n/0x1000)) .. char(0x80 + (floor(n/0x40) % 0x40)) .. char(0x80 + (n % 0x40)) + return char( + 0xF0 + floor(n/0x40000), + 0x80 + floor(n/0x1000), + 0x80 + (floor(n/0x40) % 0x40), + 0x80 + (n % 0x40) + ) + else + -- return char( + -- 0xF1 + floor(n/0x1000000), + -- 0x80 + floor(n/0x40000), + -- 0x80 + floor(n/0x1000), + -- 0x80 + (floor(n/0x40) % 0x40), + -- 0x80 + (n % 0x40) + -- ) return "?" end end diff --git a/tex/context/base/lpdf-fmt.lua b/tex/context/base/lpdf-fmt.lua index 197e24ce9..017e28ebb 100644 --- a/tex/context/base/lpdf-fmt.lua +++ b/tex/context/base/lpdf-fmt.lua @@ -642,7 +642,7 @@ function codeinjections.setformat(s) if xmp_file == "" then -- weird error else - lpdf.setxmpfile(xmp_file) + codeinjections.setxmpfile(xmp_file) end local pdf_version, inject_metadata = spec.pdf_version * 10, spec.inject_metadata local majorversion, minorversion = math.div(pdf_version,10), math.mod(pdf_version,10) diff --git a/tex/context/base/node-ini.lua b/tex/context/base/node-ini.lua index fa53f1200..474edfc1d 100644 --- a/tex/context/base/node-ini.lua +++ b/tex/context/base/node-ini.lua @@ -60,6 +60,7 @@ local free_node = node.free local remove_node = node.remove local insert_node_before = node.insert_before local insert_node_after = node.insert_after +local node_fields = node.fields local allocate = utilities.storage.allocate @@ -210,6 +211,35 @@ function nodes.showcodes() end end +-- pseudoline and shape crash on node.new + +local whatsit_node = nodecodes.whatsit + +local messyhack = table.tohash { -- temporary solution + nodecodes.attributelist, + nodecodes.attribute, + nodecodes.gluespec, + nodecodes.action, +} + +function nodes.fields(n) + local id = n.id + if id == whatsit_node then + return node_fields(id,n.subtype) + else + local t = node_fields(id) + if messyhack[id] then + for i=1,#t do + if t[i] == "subtype" then + table.remove(t,i) + break + end + end + end + return t + end +end + trackers.register("system.showcodes", nodes.showcodes) local hlist_code = nodecodes.hlist diff --git a/tex/context/base/node-ser.lua b/tex/context/base/node-ser.lua index 9c968670c..3c2e1facc 100644 --- a/tex/context/base/node-ser.lua +++ b/tex/context/base/node-ser.lua @@ -16,9 +16,9 @@ local allocate = utilities.storage.allocate local nodes, node = nodes, node local traverse = node.traverse -local node_fields = node.fields local nodecodes = nodes.nodecodes +local nodefields = nodes.fields local hlist_code = nodecodes.hlist local vlist_code = nodecodes.vlist @@ -69,7 +69,7 @@ nodes.ignorablefields = ignore -- not ok yet: function nodes.astable(n,sparse) -- not yet ok - local f, t = node_fields(n.id,n.subtype), { } + local f, t = nodefields(n), { } for i=1,#f do local v = f[i] local d = n[v] @@ -96,7 +96,7 @@ end local function totable(n,flat,verbose) -- todo: no local function local function to_table(n,flat,verbose) - local f = node_fields(n.id,n.subtype) + local f = nodefields(n) local tt = { } for k=1,#f do local v = f[k] @@ -174,7 +174,7 @@ local function serialize(root,name,handle,depth,m) if root then local fld if root.id then - fld = node_fields(root.id,root.subtype) -- we can cache these (todo) + fld = nodefields(root) -- we can cache these (todo) else fld = table.sortedkeys(root) end diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 35d6ab3a1..94a8c97d3 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index c1a9ae835..808ee507d 100644 --- a/tex/generic/context/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 03/28/11 01:03:40 +-- merge date : 03/28/11 18:59:04 do -- begin closure to overcome local limits and interference @@ -4777,7 +4777,7 @@ local otf = fonts.handlers.otf otf.glists = { "gsub", "gpos" } -otf.version = 2.720 -- beware: also sync font-mis.lua +otf.version = 2.721 -- beware: also sync font-mis.lua otf.cache = containers.define("fonts", "otf", otf.version, true) local fontdata = fonts.hashes.identifiers @@ -5340,7 +5340,7 @@ actions["prepare glyphs"] = function(data,filename,raw) local subfont = rawsubfonts[cidindex] local cidglyphs = subfont.glyphs metadata.subfonts[cidindex] = somecopy(subfont) - for index=0,subfont.glyphmax - 1 do + for index=0,subfont.glyphcnt-1 do -- we could take the previous glyphcnt instead of 0 local glyph = cidglyphs[index] if glyph then local unicode = glyph.unicode @@ -5378,6 +5378,8 @@ actions["prepare glyphs"] = function(data,filename,raw) } descriptions[unicode] = description + else + -- report_otf("potential problem: glyph 0x%04X is used but empty",index) end end end @@ -5393,14 +5395,11 @@ actions["prepare glyphs"] = function(data,filename,raw) else - for index=0,raw.glyphmax-1 do + for index=0,raw.glyphcnt-1 do -- not raw.glyphmax-1 (as that will crash) local glyph = rawglyphs[index] ---~ report_otf("1: 0x%04X: %s",index,tostring(glyph)) io.flush() if glyph then local unicode = glyph.unicode ---~ report_otf("2: 0x%04X: %s",index,tostring(unicode)) io.flush() local name = glyph.name ---~ report_otf("3: 0x%04X: %s",index,tostring(name)) io.flush() if not unicode or unicode == -1 or unicode >= criterium then unicode = private unicodes[name] = private @@ -5423,6 +5422,8 @@ actions["prepare glyphs"] = function(data,filename,raw) index = index, glyph = glyph, } + else + report_otf("potential problem: glyph 0x%04X is used but empty",index) end end @@ -8463,7 +8464,6 @@ end function handlers.gpos_single(start,kind,lookupname,kerns,sequence) local startchar = start.char - local kerns = kerns[start.char] local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,characters[startchar]) if trace_kerns then logprocess("%s: shifting single %s by (%s,%s) and correction (%s,%s)",pref(kind,lookupname),gref(startchar),dx,dy,w,h) @@ -9105,7 +9105,7 @@ function chainprocs.gpos_single(start,stop,kind,chainname,currentcontext,lookuph local lookupname = subtables[1] local kerns = lookuphash[lookupname] if kerns then - kerns = kerns[startchar] + kerns = kerns[startchar] -- needed ? if kerns then local dx, dy, w, h = setpair(start,tfmdata.parameters.factor,rlmode,sequence.flags[4],kerns,characters[startchar]) if trace_kerns then @@ -10792,9 +10792,11 @@ function definers.resolve(specification) -- for the moment here (goodies set outside features) local goodies = specification.goodies if goodies and goodies ~= "" then - local normalgoodies = specification.features.normal.goodies - if not normalgoodies or normalgoodies == "" then - specification.features.normal.goodies = goodies + local normal = specification.features.normal + if not normal then + specification.features.normal = { goodies = goodies } + elseif not normal.goodies then + normal.goodies = goodies end end -- |