diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/char-cjk.lua | 21 | ||||
-rw-r--r-- | tex/context/base/char-ini.lua | 11 | ||||
-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/sort-ini.lua | 37 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 23595 -> 23585 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 154366 -> 154368 bytes | |||
-rw-r--r-- | tex/generic/context/luatex-fonts-merged.lua | 2 |
10 files changed, 57 insertions, 22 deletions
diff --git a/tex/context/base/char-cjk.lua b/tex/context/base/char-cjk.lua index 5dc20ff74..067371c64 100644 --- a/tex/context/base/char-cjk.lua +++ b/tex/context/base/char-cjk.lua @@ -226,13 +226,30 @@ local hangul_syllable_basetable = { linebreak = "h2", } +--~ local hangul_syllable_metatable = { +--~ __index = function(t,k) +--~ local u = t.unicodeslot +--~ if k == "fscode" then +--~ -- no need to cache this as we normally use fscodes +--~ return leadconsonant(u) +--~ elseif k == "shcode" then +--~ return { decomposed(u) } +--~ elseif k == "specials" then +--~ return { "char", decomposed(u) } +--~ elseif k == "description" then +--~ return description(u) +--~ else +--~ return hangul_syllable_basetable[k] +--~ end +--~ end +--~ } + local hangul_syllable_metatable = { __index = function(t,k) local u = t.unicodeslot if k == "fscode" then - -- no need to cache this as we normally use fscodes return leadconsonant(u) - elseif k == "shcode" then + elseif k == "decomposed" then return { decomposed(u) } elseif k == "specials" then return { "char", decomposed(u) } diff --git a/tex/context/base/char-ini.lua b/tex/context/base/char-ini.lua index 2244048c3..89f8336f8 100644 --- a/tex/context/base/char-ini.lua +++ b/tex/context/base/char-ini.lua @@ -723,6 +723,17 @@ setmetatableindex(ucchars, function(t,u) if u then local c = data[u] c = c and c setmetatableindex(shchars, function(t,u) if u then local c = data[u] c = c and c.shcode c = c and utfstring(c) or (type(u) == "number" and utfchar(u)) or u t[u] = c return c end end) setmetatableindex(fschars, function(t,u) if u then local c = data[u] c = c and c.fscode c = c and utfstring(c) or (type(u) == "number" and utfchar(u)) or u t[u] = c return c end end) +local decomposed = allocate() characters.decomposed = decomposed -- lazy table + +setmetatableindex(decomposed, function(t,u) -- either a table or false + if u then + local c = data[u] + local s = c and c.decomposed or false + t[u] = s + return s + end +end) + local specialchars = allocate() characters.specialchars = specialchars -- lazy table local descriptions = allocate() characters.descriptions = descriptions -- lazy table diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii index 27881de03..675bcfd42 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.05.13 12:01} +\newcontextversion{2011.05.15 12:57} %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 dded014ed..f5906159c 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.05.13 12:01} +\newcontextversion{2011.05.15 12:57} %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 243294a2c..7acb889ad 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.05.13 12:01} +\edef\contextversion{2011.05.15 12:57} %D For those who want to use this: diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 1c92e706b..a37559c85 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.05.13 12:01} +\edef\contextversion{2011.05.15 12:57} %D For those who want to use this: diff --git a/tex/context/base/sort-ini.lua b/tex/context/base/sort-ini.lua index 12b5b49e0..7a91910ca 100644 --- a/tex/context/base/sort-ini.lua +++ b/tex/context/base/sort-ini.lua @@ -47,7 +47,7 @@ have language etc properties that then can be used.</p> local utf = unicode.utf8 local gsub, rep, sub, sort, concat = string.gsub, string.rep, string.sub, table.sort, table.concat local utfbyte, utfchar = utf.byte, utf.char -local utfcharacters = string.utfcharacters +local utfcharacters, utfvalues = string.utfcharacters, string.utfvalues local next, type, tonumber, rawget, rawset = next, type, tonumber, rawget, rawset local allocate = utilities.storage.allocate @@ -73,6 +73,8 @@ local shchars = characters.shchars local fscodes = characters.fscodes local fschars = characters.fschars +local decomposed = characters.decomposed + local variables = interfaces.variables local v_numbers = variables.numbers @@ -225,20 +227,25 @@ local function preparetables(data) end else -- we probably never enter this branch -- fschars returns a single char - s = fschars[k] - if s and s ~= k then - if trace_tests then - report_sorters(" 6 split: %s",s) - end - local ml = rawget(t,s) - if ml then - n = { } - nn = 0 - for i=1,#ml do - nn = nn + 1 - n[nn] = ml[i] - end - end +--~ s = fschars[k] +--~ if s and s ~= k then +--~ if trace_tests then +--~ report_sorters(" 6 split: %s",s) +--~ end +--~ local ml = rawget(t,s) +--~ if ml then +--~ n = { } +--~ nn = 0 +--~ for i=1,#ml do +--~ nn = nn + 1 +--~ n[nn] = ml[i] +--~ end +--~ end +--~ end + local b = utfbyte(k) + n = decomposed[b] or { b } + if trace_tests then + report_sorters(" 6 split: %s",utf.string(b)) end end if n then diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 27d2d5975..f825d0ace 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 a45b4ff0a..06d6da7d0 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua index 9c0b376f0..9c8a7e640 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 : 05/13/11 12:01:04 +-- merge date : 05/15/11 12:57:24 do -- begin closure to overcome local limits and interference |