summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-05-01 21:54:46 +0000
committerKarl Berry <karl@freefriends.org>2017-05-01 21:54:46 +0000
commitc398bf73a46b2ebddb1e34047c56456ac11f03c5 (patch)
treedeb2908a6af4bf0b473cb8216f6dfaa0ed9764ab /Master
parentf372f265ea1e6039d2bbd8d412c146cd5efc60da (diff)
luatexko (1may17)
git-svn-id: svn://tug.org/texlive/trunk@44141 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/ChangeLog7
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/README2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdfbin213898 -> 229157 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex7
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko.lua60
5 files changed, 45 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexko/ChangeLog b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
index 3dd5d45631b..cbde775b4a0 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
+++ b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
@@ -1,3 +1,10 @@
+2017-05-01 Dohyun Kim <nomos at ktug org>
+
+ Version 1.17
+
+ * luatexko.lua: rewrite reorderTM (reorder-tone-marks) function
+
+
2017-02-06 Dohyun Kim <nomos at ktug org>
Version 1.16
diff --git a/Master/texmf-dist/doc/luatex/luatexko/README b/Master/texmf-dist/doc/luatex/luatexko/README
index 37b24765f3d..4a2773c9e1d 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/README
+++ b/Master/texmf-dist/doc/luatex/luatexko/README
@@ -1,4 +1,4 @@
-LuaTeX-ko Package version 1.16 (2017/02/06)
+LuaTeX-ko Package version 1.17 (2017/05/01)
===========================================
This is a Lua(La)TeX macro package that supports typesetting Korean
diff --git a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
index f72f7e010b4..bcffd07c2fb 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
index 770e2e73b1a..72d6888fae4 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
+++ b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
@@ -13,15 +13,16 @@
\usepackage[hmargin=3.8cm]{geometry}
\usepackage[hangul]{luatexko}
\usepackage{luamplib}
-\setmainhangulfont{KoPubBatang_Pro}[
+\setmainhangulfont{Noto Serif CJK KR}[
AutoFakeSlant,
+ Script=Hangul,
+ Language=Korean,
UprightFont=* Light,
BoldFont=* Bold,
InterLatinCJK=.125em,
Expansion, Protrusion,
]
\setsanshangulfont{Noto Sans CJK KR}[
- CharRaise=-0.1ex,
Script=Hangul,
Language=Korean,
UprightFont=* DemiLight,
@@ -61,7 +62,7 @@
\author{Dohyun Kim \normalsize |<nomos at ktug org>| \and
Soojin Nam \normalsize |<jsunam at gmail com>| \and
\normalsize \url{<http://github.com/dohyunkim/luatexko>}}
-\date{Version 1.16\quad 2017/02/06}
+\date{Version 1.17\quad 2017/05/01}
\maketitle
\begin{quote}\small
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
index 48d70f5e809..2c229cedd13 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
@@ -13,8 +13,8 @@
luatexbase.provides_module {
name = 'luatexko',
- date = '2017/02/06',
- version = '1.16',
+ date = '2017/05/01',
+ version = '1.17',
description = 'Korean linebreaking and font-switching',
author = 'Dohyun Kim, Soojin Nam',
license = 'LPPL v1.3+',
@@ -217,6 +217,7 @@ local inhibitxspcode = setmetatable({
[0x00B0] = 1, -- °
[0x2032] = 1, -- ′
[0x2033] = 1, -- ″
+ [0x25CC] = 2, -- dotted circle
[0x3012] = 2, -- 〒
[0x301C] = 0, -- 〜
[0xFE14] = 1, -- ︔
@@ -1607,38 +1608,43 @@ end
-- reorder hangul tone marks
-----------------------------
local function reorderTM (head)
- local curr = d_nodetail(head)
+ local curr, todo = head, nil
while curr do
- if d_getid(curr) == glyphnode then
+ local nid = d_getid(curr)
+ if nid == glyphnode then
local uni = d_get_unicode_char(curr)
if uni == 0x302E or uni == 0x302F then
- local done = false
- local unichar = get_font_char(d_getfont(curr), uni)
- if unichar and unichar.width > 0 then
- local p = d_getprev(curr)
- while p and d_getid(p) == glyphnode do
- local pc = get_cjk_class(d_get_unicode_char(p))
- if pc == 9 then
- elseif pc == 7 or pc == 8 then
- head = d_remove_node(head,curr)
- d_setprev(curr, nil) -- prev might survive!
- head, curr = d_insert_before(head,p,curr)
- done = true
- break
- else
- break
- end
- p = d_getprev(p)
+ local tmgl = get_font_char(d_getfont(curr), uni)
+ local tmwidth = tmgl and tmgl.width or 0
+ if todo then
+ if tmwidth > 0 then
+ local tm = curr
+ head, curr = d_remove_node(head, curr)
+ d_setprev(tm, nil) -- prev might survive!
+ head = d_insert_before(head, todo, tm)
+ curr = d_getprev(curr)
+ end
+ elseif get_font_char(d_getfont(curr), 0x25CC) then
+ local u25CC = d_copy_node(curr)
+ d_setchar(u25CC, 0x25CC)
+ if tmwidth > 0 then
+ head, curr = d_insert_after(head, curr, u25CC)
+ else
+ head = d_insert_before(head, curr, u25CC)
end
end
- if not done and get_font_char(d_getfont(curr), 0x25CC) then
- local u_25CC = d_copy_node(curr)
- d_setchar(u_25CC, 0x25CC)
- d_insert_after(head, curr, u_25CC)
- end
+ todo = nil
+ elseif is_hangul(uni) or is_chosong(uni) or uni == 0x25CC then
+ todo = curr
+ elseif is_jungjongsong(uni) then
+ else
+ todo = nil
end
+ elseif nid == kernnode then
+ else
+ todo = nil
end
- curr = d_getprev(curr)
+ curr = d_getnext(curr)
end
return head
end