From d9a614d85581895050fdff04b62ae5def0c1fe5b Mon Sep 17 00:00:00 2001 From: Marius Date: Fri, 15 Nov 2013 00:40:13 +0200 Subject: beta 2013.11.14 23:22 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4107 -> 4104 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/pack-rul.lua | 12 ++++-- tex/context/base/scrp-cjk.lua | 45 +++++---------------- tex/context/base/status-files.pdf | Bin 24550 -> 24544 bytes tex/context/base/status-lua.pdf | Bin 222400 -> 222329 bytes tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 8 files changed, 20 insertions(+), 43 deletions(-) diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index d640990de..08799aadf 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{2013.11.14 18:02} +\newcontextversion{2013.11.14 23:22} %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 12fea7628..e6c66d35e 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 3dce8baed..cd2fc15c8 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.11.14 18:02} +\edef\contextversion{2013.11.14 23:22} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/pack-rul.lua b/tex/context/base/pack-rul.lua index 909c0c168..fb18eaf7c 100644 --- a/tex/context/base/pack-rul.lua +++ b/tex/context/base/pack-rul.lua @@ -17,6 +17,7 @@ local traverse_id = node.traverse_id local node_dimensions = node.dimensions local hlist_code = nodes.nodecodes.hlist +local vlist_code = nodes.nodecodes.vlist local box_code = nodes.listcodes.box local texsetdimen = tex.setdimen @@ -32,7 +33,9 @@ function commands.doreshapeframedbox(n) local minwidth = 0 local maxwidth = 0 local totalwidth = 0 - if box.width ~= 0 then + local averagewidth = 0 + local boxwidth = box.width + if boxwidth ~= 0 then -- and h.subtype == vlist_code local list = box.list if list then for h in traverse_id(hlist_code,list) do -- no dir etc needed @@ -76,17 +79,18 @@ function commands.doreshapeframedbox(n) end end end + box.width = maxwidth -- moved + averagewidth = noflines > 0 and totalwidth/noflines or 0 end - box.width = maxwidth end end end texsetcount("global","framednoflines",noflines) - texsetdimen("global","framedfirstheight",firstheight or 0) + texsetdimen("global","framedfirstheight",firstheight or 0) -- also signal texsetdimen("global","framedlastdepth",lastdepth or 0) texsetdimen("global","framedminwidth",minwidth) texsetdimen("global","framedmaxwidth",maxwidth) - texsetdimen("global","framedaveragewidth",noflines > 0 and totalwidth/noflines or 0) + texsetdimen("global","framedaveragewidth",averagewidth) end function commands.doanalyzeframedbox(n) diff --git a/tex/context/base/scrp-cjk.lua b/tex/context/base/scrp-cjk.lua index 0ceaf4bd2..4f10ceddb 100644 --- a/tex/context/base/scrp-cjk.lua +++ b/tex/context/base/scrp-cjk.lua @@ -494,48 +494,20 @@ scripts.installmethod { }, } --- function scripts.decomposehangul(head) --- local current = head --- local done = false --- while current do --- local id = current.id --- if id == glyph_code then -- local index = unicode - 0xAC00 if index >= 0 and index < 19 * 21 * 28 then ... end --- local lead_consonant, medial_vowel, tail_consonant = decomposed(current.char) --- if lead_consonant then --- if not tail_consonant then --- tail_consonant = 0x11A7 --- end --- current.char = lead_consonant --- local m = copy_node(current) --- local t = copy_node(current) --- m.char = medial_vowel --- t.char = tail_consonant --- insert_node_after(head,current,m) --- insert_node_after(head,current,t) --- done = true --- current = t --- end --- end --- current = current.next --- end --- return head, done --- end - function scripts.decomposehangul(head) local done = false for current in traverse_id(glyph_code,head) do local lead_consonant, medial_vowel, tail_consonant = decomposed(current.char) if lead_consonant then - if not tail_consonant then - tail_consonant = 0x11A7 - end - current.char = tail_consonant - local l = copy_node(current) + current.char = lead_consonant local m = copy_node(current) - l.char = lead_consonant m.char = medial_vowel - head, current = insert_node_before(head,current,m) - head, current = insert_node_before(head,current,l) + head, current = insert_node_after(head,current,m) + if tail_consonant then + local t = copy_node(current) + t.char" = tail_consonant + head, current = insert_node_after(head,current,t) + end done = true end end @@ -551,10 +523,11 @@ registerotffeature { name = "decomposehangul", description = "decompose hangul", processors = { - -- position = 1, + position = 1, node = scripts.decomposehangul, } } + -- Chinese: hanzi local chinese_0 = { diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 99960fc0d..7751c83fb 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 9fdb605e6..dc36dfc56 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-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 895ca7242..e869f62a5 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 : 11/14/13 18:02:28 +-- merge date : 11/14/13 23:22:26 do -- begin closure to overcome local limits and interference -- cgit v1.2.3