summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/char-cjk.lua21
-rw-r--r--tex/context/base/char-ini.lua11
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/sort-ini.lua37
-rw-r--r--tex/context/base/status-files.pdfbin23595 -> 23585 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin154366 -> 154368 bytes
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
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 bde0354a3..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.14 16:34}
+\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 32f2a86fa..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.14 16:34}
+\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 53a80364b..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.14 16:34}
+\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 37c91ee86..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.14 16:34}
+\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
index ffe3b9c23..f825d0ace 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index 201f19d0f..06d6da7d0 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 3cebee2e1..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/14/11 16:34:12
+-- merge date : 05/15/11 12:57:24
do -- begin closure to overcome local limits and interference