texlive[44141] Master/texmf-dist: luatexko (1may17)
commits+karl at tug.org
commits+karl at tug.org
Mon May 1 23:54:46 CEST 2017
Revision: 44141
http://tug.org/svn/texlive?view=revision&revision=44141
Author: karl
Date: 2017-05-01 23:54:46 +0200 (Mon, 01 May 2017)
Log Message:
-----------
luatexko (1may17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
trunk/Master/texmf-dist/doc/luatex/luatexko/README
trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
trunk/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
Modified: trunk/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexko/ChangeLog 2017-05-01 21:54:33 UTC (rev 44140)
+++ trunk/Master/texmf-dist/doc/luatex/luatexko/ChangeLog 2017-05-01 21:54:46 UTC (rev 44141)
@@ -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
Modified: trunk/Master/texmf-dist/doc/luatex/luatexko/README
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexko/README 2017-05-01 21:54:33 UTC (rev 44140)
+++ trunk/Master/texmf-dist/doc/luatex/luatexko/README 2017-05-01 21:54:46 UTC (rev 44141)
@@ -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
Modified: trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex 2017-05-01 21:54:33 UTC (rev 44140)
+++ trunk/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex 2017-05-01 21:54:46 UTC (rev 44141)
@@ -13,8 +13,10 @@
\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,
@@ -21,7 +23,6 @@
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
Modified: trunk/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
===================================================================
--- trunk/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua 2017-05-01 21:54:33 UTC (rev 44140)
+++ trunk/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua 2017-05-01 21:54:46 UTC (rev 44141)
@@ -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 @@
[0x00B0] = 1, -- °
[0x2032] = 1, -- ′
[0x2033] = 1, -- ″
+ [0x25CC] = 2, -- dotted circle
[0x3012] = 2, -- 〒
[0x301C] = 0, -- 〜
[0xFE14] = 1, -- ︔
@@ -1607,38 +1608,43 @@
-- 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
More information about the tex-live-commits
mailing list