diff options
author | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2012-10-19 01:20:13 +0300 |
commit | 69d2352af4b60929b37fc49f3bdb263977016244 (patch) | |
tree | db5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/char-cjk.lua | |
parent | c18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff) | |
download | context-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz |
stable 2012.05.30 11:26
Diffstat (limited to 'tex/context/base/char-cjk.lua')
-rw-r--r-- | tex/context/base/char-cjk.lua | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/tex/context/base/char-cjk.lua b/tex/context/base/char-cjk.lua index 3d7de1423..b077f4a3e 100644 --- a/tex/context/base/char-cjk.lua +++ b/tex/context/base/char-cjk.lua @@ -12,8 +12,7 @@ local floor = math.floor local format = string.format local utfchar = utf.char -local ranges = characters.ranges -local allocate = utilities.storage.allocate +local ranges = characters.ranges -- Hangul Syllable @@ -210,7 +209,7 @@ local remapped = { -- this might be merged into char-def.lua [0x11C2] = 0x314E, -- H } -characters.hangul = allocate { +characters.hangul = { decomposed = decomposed, description = description, leadconsonant = leadconsonant, @@ -227,6 +226,24 @@ 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 |