diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/font-otf.lua | 18 | ||||
-rw-r--r-- | tex/context/base/lpdf-epa.lua | 33 | ||||
-rw-r--r-- | tex/context/base/lxml-aux.lua | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 20 |
6 files changed, 53 insertions, 24 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index bfb881759..c37fdc72a 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2010.10.29 11:35} +\newcontextversion{2010.10.29 18:15} %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.tex b/tex/context/base/context.tex index 94e5edbcc..394703624 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -20,7 +20,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2010.10.29 11:35} +\edef\contextversion{2010.10.29 18:15} %D For those who want to use this: diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua index 2a19dc5f6..7e068ae70 100644 --- a/tex/context/base/font-otf.lua +++ b/tex/context/base/font-otf.lua @@ -984,6 +984,7 @@ actions["prepare unicodes"] = function(data,filename,raw) local criterium = fonts.privateoffset local private = criterium local glyphs = data.glyphs + -- todo: nofmultiples for index, glyph in next, glyphs do if index > 0 then local name = glyph.name -- really needed ? @@ -1003,7 +1004,22 @@ actions["prepare unicodes"] = function(data,filename,raw) unicodes[name] = unicode end -- maybe deal with altuni here in the future but first we need - -- to encounter a proper font that sets them + -- to encounter a proper font that sets them; we have to wait till + -- a next luatex binary as currently the unicode numbers can be out + -- of bounds + if false then + local altuni = glyph.altuni + if altuni then + local un = { unicodes[name] } + for i=1,#altuni do + local unicode = altuni[i].unicode + multiples[#multiples+1] = name + un[i+1] = unicode + indices[unicode] = index -- maybe check for duplicates + end + unicodes[name] = un + end + end else -- message that something is wrong end diff --git a/tex/context/base/lpdf-epa.lua b/tex/context/base/lpdf-epa.lua index 58bbcf821..1e5b3646a 100644 --- a/tex/context/base/lpdf-epa.lua +++ b/tex/context/base/lpdf-epa.lua @@ -25,27 +25,21 @@ local layerspec = { -- predefining saves time "epdflinks" } -local locationspec = { -- predefining saves time - x = "", - y = "", - preset = "leftbottom", -} - -local buttonspec = { -- predefining saves time - width = "", - height = "", - offset = variables.overlay, - frame = trace_links and variables.on or variables.off, -} - local function add_link(x,y,w,h,destination,what) if trace_links then - report_link("dx: %04i, dy: %04i, wd: %04i, ht: %04i, destination: %s, type: %s",x,y,w,h,destination,what) + report_link("dx: % 4i, dy: % 4i, wd: % 4i, ht: % 4i, destination: %s, type: %s",x,y,w,h,destination,what) end - locationspec.x = x .. "bp" - locationspec.y = y .. "bp" - buttonspec.width = w .. "bp" - buttonspec.height = h .. "bp" + local locationspec = { -- predefining saves time + x = x .. "bp", + y = y .. "bp", + preset = "leftbottom", + } + local buttonspec = { + width = w .. "bp", + height = h .. "bp", + offset = variables.overlay, + frame = trace_links and variables.on or variables.off, + } context.setlayer ( layerspec, locationspec, @@ -148,6 +142,9 @@ function codeinjections.mergereferences(specification) context.flushlayer { "epdflinks" } -- context("\\gdef\\figurereference{%s}",reference) -- global context.setgvalue("figurereference",reference) -- global + if trace_links then + report_link("setting figure reference to '%s'",reference) + end specification.reference = reference return namespace end diff --git a/tex/context/base/lxml-aux.lua b/tex/context/base/lxml-aux.lua index 088d82881..521fb71ab 100644 --- a/tex/context/base/lxml-aux.lua +++ b/tex/context/base/lxml-aux.lua @@ -383,7 +383,7 @@ local function stripelement(e,nolines,anywhere) end end end - local nedt = #nedt + local nedt = #edt if nedt > 0 then -- strip end local str = edt[nedt] diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 0cdeaeba6..6075ae6a1 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 : 10/29/10 11:35:59 +-- merge date : 10/29/10 18:15:03 do -- begin closure to overcome local limits and interference @@ -6614,6 +6614,7 @@ actions["prepare unicodes"] = function(data,filename,raw) local criterium = fonts.privateoffset local private = criterium local glyphs = data.glyphs + -- todo: nofmultiples for index, glyph in next, glyphs do if index > 0 then local name = glyph.name -- really needed ? @@ -6633,7 +6634,22 @@ actions["prepare unicodes"] = function(data,filename,raw) unicodes[name] = unicode end -- maybe deal with altuni here in the future but first we need - -- to encounter a proper font that sets them + -- to encounter a proper font that sets them; we have to wait till + -- a next luatex binary as currently the unicode numbers can be out + -- of bounds + if false then + local altuni = glyph.altuni + if altuni then + local un = { unicodes[name] } + for i=1,#altuni do + local unicode = altuni[i].unicode + multiples[#multiples+1] = name + un[i+1] = unicode + indices[unicode] = index -- maybe check for duplicates + end + unicodes[name] = un + end + end else -- message that something is wrong end |