diff options
author | Marius <mariausol@gmail.com> | 2013-11-04 15:20:14 +0200 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2013-11-04 15:20:14 +0200 |
commit | 0c91921644d2dafa66041f56be1e4c8e045128d6 (patch) | |
tree | b51cd2465ceebafb5da72822a6ddde47c0811d58 /tex | |
parent | 176eb4a0fb38bc08a1b93b60d9d68f613e08411e (diff) | |
download | context-0c91921644d2dafa66041f56be1e4c8e045128d6.tar.gz |
beta 2013.11.04 14:10
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/context-version.pdf | bin | 4104 -> 4107 bytes | |||
-rw-r--r-- | tex/context/base/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/scrp-cjk.lua | 70 | ||||
-rw-r--r-- | tex/context/base/status-files.pdf | bin | 24572 -> 24560 bytes | |||
-rw-r--r-- | tex/context/base/status-lua.pdf | bin | 225232 -> 225257 bytes | |||
-rw-r--r-- | tex/context/base/util-str.lua | 2 | ||||
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 2 |
8 files changed, 71 insertions, 7 deletions
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index 0a084215f..778340da1 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{2013.11.04 11:52} +\newcontextversion{2013.11.04 14: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 3d5cd990f..34c46400d 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 c598e9d6c..1318b2ab1 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -25,7 +25,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2013.11.04 11:52} +\edef\contextversion{2013.11.04 14:10} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/scrp-cjk.lua b/tex/context/base/scrp-cjk.lua index f7167b45c..0ceaf4bd2 100644 --- a/tex/context/base/scrp-cjk.lua +++ b/tex/context/base/scrp-cjk.lua @@ -16,9 +16,11 @@ if not modules then modules = { } end modules ['scrp-cjk'] = { local utfchar = utf.char -local insert_node_after = node.insert_after -local insert_node_before = node.insert_before +local insert_node_after = nodes.insert_after +local insert_node_before = nodes.insert_before local remove_node = nodes.remove +local copy_node = nodes.copy +local traverse_id = nodes.traverse_id local nodepool = nodes.pool local new_glue = nodepool.glue @@ -44,6 +46,8 @@ local fontdata = fonthashes.identifiers local quaddata = fonthashes.quads local spacedata = fonthashes.spaces +local decomposed = characters.hangul.decomposed + local trace_details = false trackers.register("scripts.details", function(v) trace_details = v end) local report_details = logs.reporter("scripts","detail") @@ -490,6 +494,67 @@ scripts.installmethod { }, } +-- function scripts.decomposehangul(head) +-- local current = head +-- local done = false +-- while current do +-- local id = current.id +-- if id == glyph_code then -- local index = unicode - 0xAC00 if index >= 0 and index < 19 * 21 * 28 then ... end +-- local lead_consonant, medial_vowel, tail_consonant = decomposed(current.char) +-- if lead_consonant then +-- if not tail_consonant then +-- tail_consonant = 0x11A7 +-- end +-- current.char = lead_consonant +-- local m = copy_node(current) +-- local t = copy_node(current) +-- m.char = medial_vowel +-- t.char = tail_consonant +-- insert_node_after(head,current,m) +-- insert_node_after(head,current,t) +-- done = true +-- current = t +-- end +-- end +-- current = current.next +-- end +-- return head, done +-- end + +function scripts.decomposehangul(head) + local done = false + for current in traverse_id(glyph_code,head) do + local lead_consonant, medial_vowel, tail_consonant = decomposed(current.char) + if lead_consonant then + if not tail_consonant then + tail_consonant = 0x11A7 + end + current.char = tail_consonant + local l = copy_node(current) + local m = copy_node(current) + l.char = lead_consonant + m.char = medial_vowel + head, current = insert_node_before(head,current,m) + head, current = insert_node_before(head,current,l) + done = true + end + end + return head, done +end + +-- nodes.tasks.prependaction("processors","normalizers","scripts.decomposehangul") + +local otffeatures = fonts.constructors.newfeatures("otf") +local registerotffeature = otffeatures.register + +registerotffeature { + name = "decomposehangul", + description = "decompose hangul", + processors = { + -- position = 1, + node = scripts.decomposehangul, + } +} -- Chinese: hanzi local chinese_0 = { @@ -948,4 +1013,3 @@ scripts.installmethod { }, }, } - diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf Binary files differindex 15ebfb22f..29b73a56e 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 8b7df2357..929760a24 100644 --- a/tex/context/base/status-lua.pdf +++ b/tex/context/base/status-lua.pdf diff --git a/tex/context/base/util-str.lua b/tex/context/base/util-str.lua index 24a3f6e82..af8b1651e 100644 --- a/tex/context/base/util-str.lua +++ b/tex/context/base/util-str.lua @@ -647,7 +647,7 @@ local format_extension = function(extensions,f,name) end end --- aA b cC d eE f gG hH iI jJ lL mM N o p qQ r sS tT uU wW xX +-- aA b cC d eE f gG hH iI jJ lL mM N o p qQ r sS tT uU wW xX z local builder = Cs { "start", start = ( diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 3e89856fb..7ebdb0666 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 : 11/04/13 11:52:02 +-- merge date : 11/04/13 14:10:07 do -- begin closure to overcome local limits and interference |