summaryrefslogtreecommitdiff
path: root/tex/context/base/char-cjk.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/char-cjk.lua')
-rw-r--r--tex/context/base/char-cjk.lua23
1 files changed, 3 insertions, 20 deletions
diff --git a/tex/context/base/char-cjk.lua b/tex/context/base/char-cjk.lua
index b077f4a3e..3d7de1423 100644
--- a/tex/context/base/char-cjk.lua
+++ b/tex/context/base/char-cjk.lua
@@ -12,7 +12,8 @@ local floor = math.floor
local format = string.format
local utfchar = utf.char
-local ranges = characters.ranges
+local ranges = characters.ranges
+local allocate = utilities.storage.allocate
-- Hangul Syllable
@@ -209,7 +210,7 @@ local remapped = { -- this might be merged into char-def.lua
[0x11C2] = 0x314E, -- H
}
-characters.hangul = {
+characters.hangul = allocate {
decomposed = decomposed,
description = description,
leadconsonant = leadconsonant,
@@ -226,24 +227,6 @@ 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