From 095d5c305c2c8b536710a5b0ef5e104f07995fb5 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 24 Aug 2015 15:15:08 +0200 Subject: 2015-08-24 15:07:00 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4204 -> 4200 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/font-ctx.lua | 1 + tex/context/base/font-otn.lua | 5 +- tex/context/base/font-otr.lua | 4 +- tex/context/base/font-ots.lua | 6 +- tex/context/base/s-fonts-ligatures.mkiv | 90 +-------------------- tex/context/base/status-files.pdf | Bin 24442 -> 24450 bytes tex/context/base/status-lua.pdf | Bin 255169 -> 255168 bytes tex/generic/context/luatex/luatex-basics-nod.lua | 3 + tex/generic/context/luatex/luatex-fonts-merged.lua | 4 +- 12 files changed, 20 insertions(+), 97 deletions(-) (limited to 'tex') diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index c8c3251a6..4a78dabc5 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{2015.08.24 10:53} +\newcontextversion{2015.08.24 15:05} %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/context-version.pdf b/tex/context/base/context-version.pdf index 4997de8aa..17713eaf8 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index de5c4e2d0..580154bdc 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.08.24 10:53} +\edef\contextversion{2015.08.24 15:05} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-ctx.lua b/tex/context/base/font-ctx.lua index 8c6142abb..ca9a83086 100644 --- a/tex/context/base/font-ctx.lua +++ b/tex/context/base/font-ctx.lua @@ -1368,6 +1368,7 @@ function constructors.calculatescale(tfmdata,scaledpoints,relativeid,specificati local parameters = tfmdata.parameters local designsize = parameters.designsize if special == "ht" then +-- inspect(parameters) local height = parameters.ascender * designsize / parameters.units scaledpoints = (scaledpoints/height) * designsize elseif special == "cp" then diff --git a/tex/context/base/font-otn.lua b/tex/context/base/font-otn.lua index 3b169143e..769438f47 100644 --- a/tex/context/base/font-otn.lua +++ b/tex/context/base/font-otn.lua @@ -580,9 +580,10 @@ local function toligature(kind,lookupname,head,start,stop,char,markflag,discfoun return head, start end -- needs testing (side effects): - local components = getfield(base,"components") + local components = getfield(start,"components") if components then - flush_node_list(components) +-- we get a double free .. needs checking +-- flush_node_list(components) end -- local prev = getprev(start) diff --git a/tex/context/base/font-otr.lua b/tex/context/base/font-otr.lua index 210aba67a..0f22fae5d 100644 --- a/tex/context/base/font-otr.lua +++ b/tex/context/base/font-otr.lua @@ -131,7 +131,7 @@ local function readlongdatetime(f) return 0x100000000 * d + 0x1000000 * e + 0x10000 * f + 0x100 * g + h end -local tableversion = 0.001 +local tableversion = 0.002 local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF readers.tableversion = tableversion @@ -1634,6 +1634,8 @@ local function getinfo(maindata,sub) monospaced = (tonumber(postscript.monospaced or 0) > 0) or metrics.panosewidth == "monospaced", averagewidth = metrics.averagewidth, xheight = metrics.xheight, + ascender = metrics.typoascender, + descender = metrics.typodescender, } elseif n then return { diff --git a/tex/context/base/font-ots.lua b/tex/context/base/font-ots.lua index 01a4b7c24..115abb32d 100644 --- a/tex/context/base/font-ots.lua +++ b/tex/context/base/font-ots.lua @@ -13,6 +13,7 @@ if not modules then modules = { } end modules ['font-ots'] = { -- sequences -- todo: looks like we have a leak somewhere (probably in ligatures) -- todo: copy attributes to disc +-- todo: get rid of components, better use the tounicode entry if needed (at all) -- we do some disc juggling where we need to keep in mind that the -- pre, post and replace fields can have prev pointers to a nesting @@ -512,9 +513,10 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou return head, start end -- needs testing (side effects): - local components = getfield(base,"components") + local components = getfield(start,"components") if components then - flush_node_list(components) +-- we get a double free .. needs checking +-- flush_node_list(components) end -- local prev = getprev(start) diff --git a/tex/context/base/s-fonts-ligatures.mkiv b/tex/context/base/s-fonts-ligatures.mkiv index e6ff2461e..74fab3e58 100644 --- a/tex/context/base/s-fonts-ligatures.mkiv +++ b/tex/context/base/s-fonts-ligatures.mkiv @@ -199,94 +199,6 @@ \startTEXpage[offset=10pt] \showotfligatures[font=brill.otf, features=default] \stopTEXpage \startTEXpage[offset=10pt] \showotfligatures[font=gentiumplus-r.ttf, features=default] \stopTEXpage \startTEXpage[offset=10pt] \showotfligatures[font=cambria, features=default] \stopTEXpage + \startTEXpage[offset=10pt] \showotfligatures[font=garamond, features=default] \stopTEXpage \stoptext - -% \startluacode -% -% local f = fonts.hashes.identifiers[true] -% -% local sequences = f.resources.sequences -% local descriptions = f.shared.rawdata.descriptions -% local lookuptypes = f.resources.lookuptypes -% local lookups = f.resources.lookups -% -% local ligatures = { "liga", "dlig", "rlig", "clig", "tlig", "ccmp" } -% local found = { } -% -% for i=1,#sequences do -% local sequence = sequences[i] -% local features = sequence.features -% for i=1,#ligatures do -% local l = ligatures[i] -% if features[l] then -% local subtables = sequence.subtables -% if subtables then -% for i=1,#subtables do -% local subtable = subtables[i] -% local lookup = found[subtable] -% if lookup then -% lookup[l] = true -% else -% found[subtable] = { [l] = true } -% end -% end -% end -% end -% end -% end -% -% context.starttabulate { "|||T|T|T|" } -% -% local function flush(l,v,start,unicode,data,done) -% local features = found[l] -% if features then -% local lookuptype = lookuptypes[l] -% if lookuptype == "ligature" then -% local t = { } -% for i=1,#v do -% t[i] = utf.char(v[i]) -% end -% t = table.concat(t," ") -% if not done[t] then -% context.NC() -% context(t) -% context.NC() -% context(utf.char(unicode)) -% context.NC() -% context(" %t",table.sortedkeys(features)) -% context.NC() -% local name = data.name -% if name then -% context(name) -% end -% context.NC() -% context("%U",unicode) -% context.NC() -% context.NR() -% done[t] = true -% end -% end -% end -% end -% -% for unicode, data in table.sortedhash(descriptions) do -% local slookups = data.slookups -% local mlookups = data.mlookups -% local done = { } -% if slookups then -% for l, v in next, slookups do -% flush(l,v,1,unicode,data,done) -% end -% end -% if mlookups then -% for i=1,#mlookups do -% local v = mlookups[i] -% flush(v[1],v,2,unicode,data,done) -% end -% end -% end -% -% context.stoptabulate() -% -% \stopluacode diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 39fe66e14..0d8bdc05d 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index 39607f265..71c435714 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/generic/context/luatex/luatex-basics-nod.lua b/tex/generic/context/luatex/luatex-basics-nod.lua index 1ec2895ba..39400a3d0 100644 --- a/tex/generic/context/luatex/luatex-basics-nod.lua +++ b/tex/generic/context/luatex/luatex-basics-nod.lua @@ -56,6 +56,9 @@ local whatcodes = { } for k,v in next, node.whatsits() do whatcodes[string.gs local glyphcodes = { [0] = "character", "glyph", "ligature", "ghost", "left", "right" } local disccodes = { [0] = "discretionary", "explicit", "automatic", "regular", "first", "second" } +for i=0,#glyphcodes do glyphcodes[glyphcodes[i]] = i end +for i=0,#disccodes do disccodes [disccodes [i]] = i end + nodes.nodecodes = nodecodes nodes.whatcodes = whatcodes nodes.whatsitcodes = whatcodes diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index b1babe8c9..56e5a12bd 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 08/24/15 10:53:49 +-- merge date : 08/24/15 15:05:23 do -- begin closure to overcome local limits and interference @@ -3905,6 +3905,8 @@ local nodecodes={} for k,v in next,node.types () do nodecodes[string.gsub(v,"_" local whatcodes={} for k,v in next,node.whatsits() do whatcodes[string.gsub(v,"_","")]=k end local glyphcodes={ [0]="character","glyph","ligature","ghost","left","right" } local disccodes={ [0]="discretionary","explicit","automatic","regular","first","second" } +for i=0,#glyphcodes do glyphcodes[glyphcodes[i]]=i end +for i=0,#disccodes do disccodes [disccodes [i]]=i end nodes.nodecodes=nodecodes nodes.whatcodes=whatcodes nodes.whatsitcodes=whatcodes -- cgit v1.2.3