diff options
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4207 -> 4202 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/lang-rep.lua | 26 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24430 -> 24443 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 255546 -> 255541 bytes | |||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
7 files changed, 24 insertions, 8 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 1dd6f16ae..7dcd2c989 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.10 19:46} +\newcontextversion{2015.08.11 10:10} %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 Binary files differindex 36281b2ef..c842ed576 100644 --- a/tex/context/base/context-version.pdf +++ b/tex/context/base/context-version.pdf diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 4b062f46e..e9a8ee7cb 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.10 19:46} +\edef\contextversion{2015.08.11 10:10} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/lang-rep.lua b/tex/context/base/lang-rep.lua index 95a5e545a..5ee862333 100644 --- a/tex/context/base/lang-rep.lua +++ b/tex/context/base/lang-rep.lua @@ -21,7 +21,11 @@ local P, C, U, Cc, Ct, lpegmatch = lpeg.P, lpeg.C, lpeg.patterns.utf8character, local find = string.find local grouped = P("{") * ( Ct((U/utfbyte-P("}"))^1) + Cc(false) ) * P("}")-- grouped -local splitter = Ct((Ct(Cc("discretionary") * grouped * grouped * grouped) + U/utfbyte)^1) +local splitter = Ct(( + Ct(Cc("discretionary") * grouped * grouped * grouped) + + Ct(Cc("noligature") * grouped) + + U/utfbyte + )^1) local trace_replacements = false trackers.register("languages.replacements", function(v) trace_replacements = v end) local trace_detail = false trackers.register("languages.replacements.detail", function(v) trace_detail = v end) @@ -38,6 +42,7 @@ local setfield = nuts.setfield local getnext = nuts.getnext local getprev = nuts.getprev local getattr = nuts.getattr +local setattr = nuts.setattr local getid = nuts.getid local getchar = nuts.getchar @@ -62,6 +67,7 @@ local replacements = languages.replacements or { } languages.replacements = replacements local a_replacements = attributes.private("replacements") +local a_noligature = attributes.private("noligature") local lists = { } local last = 0 @@ -79,7 +85,7 @@ end) lists[v_reset].attribute = unsetvalue -- so we discard 0 --- todo: glue kern +-- todo: glue kern attr local function add(root,word,replacement) local list = utfsplit(word,true) @@ -199,7 +205,8 @@ function replacements.handler(head) if not current then head = nil end - for i=1,newlength do + local i = 1 + while i <= newlength do local codes = newcodes[i] local new = nil if type(codes) == "table" then @@ -216,16 +223,25 @@ function replacements.handler(head) if replace then setfield(new,"replace",tonodes(replace,last)) end + head, current = insert_after(head,current,new) + elseif method == "noligature" then + -- not that efficient to copy but ok for testing + local list = codes[2] + for i=1,#list do + new = copy_node(last) + setfield(new,"char",list[i]) + setattr(new,a_noligature,1) + head, current = insert_after(head,current,new) + end else -- todo end else new = copy_node(last) setfield(new,"char",codes) - end - if new then head, current = insert_after(head,current,new) end + i = i + 1 end flush_list(list) elseif oldlength == newlength then -- #old == #new diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 0f6019d35..a16202a94 100644 --- a/tex/context/base/status-files.pdf +++ b/tex/context/base/status-files.pdf diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf Binary files differindex 4858ca475..f3659e01c 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index acb637f4e..f237a1ba9 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/10/15 19:46:54 +-- merge date : 08/11/15 10:10:14 do -- begin closure to overcome local limits and interference |