From 01ecdae080b6a9254b0b57b338705f9a164491ab Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Mon, 28 Sep 2015 21:30:00 +0900 Subject: [PATCH] rename ksp_... to kanjiskip_... --- doc/luatexja.dtx | 22 ++++++------ src/jfm-ujis.lua | 102 ++++++++++++++++++++++++++-------------------------- src/jfm-ujisv.lua | 102 ++++++++++++++++++++++++++-------------------------- src/ltj-jfmglue.lua | 6 ++-- src/ltj-jfont.lua | 14 ++++---- 5 files changed, 121 insertions(+), 125 deletions(-) diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 0c159e4..08329d7 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -16,7 +16,6 @@ \makeatletter %%%%%%%% \directlua{if jit then jit.on() end} - \usepackage{metalogo,amsmath,array,tikz,pict2e,multienum,float} \usepackage{booktabs,multicol,luatexja-ruby} \usepackage[all]{xy} @@ -25,6 +24,7 @@ %%%%%%%% fonts \usepackage{luatexja-otf} \directlua{luatexja.otf.enable_ivs()} +\expandafter\let\csname xetex_suppressfontnotfounderror:D\endcsname\suppressfontnotfounderror \usepackage[match]{luatexja-fontspec} \usepackage[kozuka-pr6n]{luatexja-preset} \usepackage{unicode-math} @@ -4464,23 +4464,23 @@ we specify to $0.25/(0.5+0.25)=1/3$. 度を$-2$から$+2$の間の整数で指定する.大きい値ほど「伸びやすく,縮みやすい」 ことを意味する.省略時の値 は0であり,範囲外の値が指定されたときの動作は未定義である. -\item[ksp\_natural=\textrm{, }% - ksp\_stretch=\textrm{, }ksp\_shrink=]\leavevmode +\item[kanjiskip\_natural=\textrm{, }% + kanjiskip\_stretch=\textrm{, }kanjiskip\_shrink=]\leavevmode JFMによって本来挿入されるグルーの他に -\Param{kanjiskip}分の空白を自然長(\texttt{ksp\_natural}),伸び量(\texttt{ksp\_stretch}), -縮み量(\texttt{ksp\_shrink})ごとに挿入する\footnote{本来\Param{xkanjiskip}が挿入される場所においては +\Param{kanjiskip}分の空白を自然長(\texttt{kanjiskip\_natural}),伸び量(\texttt{kanjiskip\_stretch}), +縮み量(\texttt{kanjiskip\_shrink})ごとに挿入する\footnote{本来\Param{xkanjiskip}が挿入される場所においては \Param{xkanjiskip}分の空白を自然長・伸び量・縮み量ごとに.追加できる.}% ための指定である.いずれも省略された場合のデフォルト値は0(追加しない)である. 例えば,\LuaTeX-jaの横組標準JFMの \texttt{jfm-ujis.lua} では, \begin{itemize} \item 通常の文字「あ」と開き括弧類の間に入るグルーは,自然長・縮み量半角,伸び量0のグルー -となっているが,さらに\Param{kanjiskip}の伸び量に \texttt{ksp\_stretch}(ここでは1)を掛け +となっているが,さらに\Param{kanjiskip}の伸び量に \texttt{kanjiskip\_stretch}(ここでは1)を掛け た分だけ伸びることが許される. \item 同様に,閉じ括弧類(全角コンマ「,」も含む)と通常の文字「う」「え」の間にも 自然長・縮み量半角,伸び量0のグルー -となっているが,さらに\Param{kanjiskip}の伸び量に \texttt{ksp\_stretch}(ここでは1)を掛け +となっているが,さらに\Param{kanjiskip}の伸び量に \texttt{kanjiskip\_stretch}(ここでは1)を掛け た分だけ伸びることが許される. \end{itemize} となっている.従って,以下のような組版結果を得る. @@ -4503,8 +4503,8 @@ An integer in $[-2,2]$ (treated as 0 if omitted), and this is used only in line adjustment with priority by \Pkg{luatexja-adjust} (see Subsection~\ref{ssec-adj}). Higher value means the glue is easy to stretch, and is also easy to shrink. -\item[ksp\_natural=\textrm{, }% - ksp\_stretch=\textrm{, }ksp\_shrink=]\leavevmode +\item[kanjiskip\_natural=\textrm{, }% + kanjiskip\_stretch=\textrm{, }kanjiskip\_shrink=]\leavevmode These keys specifies whether the natural width of \Param{kanjiskip} (the stretch/shrink part, respectively) will be inserted in addition to the original @@ -4516,12 +4516,12 @@ As an example, in \texttt{jfm-ujis.lua}, the standard JFM in horizontal writing, a glue whose natural part and shrink part are both half-width, while its stretch part is zero. However, this glue also can be stretched as much as the stretch part of \Param{kanjiskip} times the value of - \texttt{ksp\_stretch} key (1 in this case). + \texttt{kanjiskip\_stretch} key (1 in this case). \item Between an ideographic closeing brackets (the ideographic comma ``,'' is included) and an ordinal letter, we have the same glue. Again, this glue also can be stretched as much as the stretch part of \Param{kanjiskip} times the value of - \texttt{ksp\_stretch} key (1 in this case). + \texttt{kanjiskip\_stretch} key (1 in this case). \end{itemize} Hence we have the following result: diff --git a/src/jfm-ujis.lua b/src/jfm-ujis.lua index 2960b14..a0d1675 100644 --- a/src/jfm-ujis.lua +++ b/src/jfm-ujis.lua @@ -16,15 +16,13 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { - -- [index] = { width, stretch, shrink, [priority, [ratio]], - -- ksp_nat=t/f, ksp_stretch=t/f, ksp_shrink=t/f } - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -37,15 +35,15 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { -- 3 のみ四分,あとは0 - [0] = { 0, 0, 0, ksp_shrink=1 }, - [1] = { 0, 0, 0, ksp_shrink=1 }, - [2] = { 0, 0, 0, ksp_shrink=1, ksp_stretch=1 }, + [0] = { 0, 0, 0, kanjiskip_shrink=1 }, + [1] = { 0, 0, 0, kanjiskip_shrink=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1, kanjiskip_stretch=1 }, [3] = { 0.25, 0.0, 0.25, priority=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [5] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [5] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -58,15 +56,15 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { -- 3 は四分, 2, 4, 9 は0, あとは0.5 - [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1}, + [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1}, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, } }, @@ -95,13 +93,13 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { -- 3 は.75, 2, 4 は0, あとは0.5 - [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, ksp_stretch=1 }, - [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, + [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, kanjiskip_stretch=1 }, + [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, } }, @@ -110,11 +108,11 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [5] = 0.0 @@ -126,14 +124,14 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { - [0] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [0] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [5] = 0.0 @@ -165,13 +163,13 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 0.5, height = 0.88, depth = 0.12, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -197,11 +195,11 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.88, depth = 0.12, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [8] = 0.0 diff --git a/src/jfm-ujisv.lua b/src/jfm-ujisv.lua index 1fbde91..6bf3075 100644 --- a/src/jfm-ujisv.lua +++ b/src/jfm-ujisv.lua @@ -16,15 +16,13 @@ luatexja.jfont.define_jfm { align = 'middle', left = 0.00, down = 0.00, width = 1.0, height = 0.50, depth = 0.50, italic=0.0, glue = { - -- [index] = { width, stretch, shrink, [priority, [ratio]], - -- ksp_nat=t/f, ksp_stretch=t/f, ksp_shrink=t/f } - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -37,15 +35,15 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.50, depth = 0.50, italic=0.0, glue = { -- 3 のみ四分,あとは0 - [0] = { 0, 0, 0, ksp_shrink=1 }, - [1] = { 0, 0, 0, ksp_shrink=1 }, - [2] = { 0, 0, 0, ksp_stretch=1, ksp_shrink=1 }, + [0] = { 0, 0, 0, kanjiskip_shrink=1 }, + [1] = { 0, 0, 0, kanjiskip_shrink=1 }, + [2] = { 0, 0, 0, kanjiskip_stretch=1, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [5] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [5] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -58,15 +56,15 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.50, depth = 0.50, italic=0.0, glue = { -- 3 は四分, 2, 4, 9 は0, あとは0.5 - [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [5] = { 0.5 , 0.0, 0.5, rario=0, ksp_stretch=1 }, - [6] = { 0.5 , 0.0, 0.5, rario=0, ksp_stretch=1 }, - [7] = { 0.5 , 0.0, 0.5, rario=0, ksp_stretch=1 }, - [8] = { 0.5 , 0.0, 0.5, rario=0, ksp_stretch=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [5] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 }, + [6] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 }, + [7] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 }, + [8] = { 0.5 , 0.0, 0.5, rario=0, kanjiskip_stretch=1 }, } }, @@ -95,13 +93,13 @@ luatexja.jfont.define_jfm { width = 0.5, height = 0.50, depth = 0.50, italic=0.0, glue = { -- 3 は.75, 2, 4 は0, あとは0.5 - [0] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, ksp_stretch=1 }, - [5] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [6] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [7] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, - [8] = { 0.5 , 0.0, 0.5, ratio=0, ksp_stretch=1 }, + [0] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1./3, kanjiskip_stretch=1 }, + [5] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [6] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [7] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, + [8] = { 0.5 , 0.0, 0.5, ratio=0, kanjiskip_stretch=1 }, } }, @@ -110,11 +108,11 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.50, depth = 0.50, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [5] = 0.0 @@ -126,14 +124,14 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.50, depth = 0.50, italic=0.0, glue = { - [0] = { 1.0 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [0] = { 1.0 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.75, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [5] = 0.0 @@ -165,13 +163,13 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 0.5, height = 0.5, depth = 0.5, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, - [7] = { 0, 0, 0, ksp_shrink=1 }, - [8] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, + [7] = { 0, 0, 0, kanjiskip_shrink=1 }, + [8] = { 0, 0, 0, kanjiskip_shrink=1 }, } }, @@ -197,11 +195,11 @@ luatexja.jfont.define_jfm { align = 'left', left = 0.0, down = 0.0, width = 1.0, height = 0.50, depth = 0.50, italic=0.0, glue = { - [1] = { 0.5 , 0.0, 0.5, ratio=1, ksp_stretch=1 }, - [2] = { 0, 0, 0, ksp_shrink=1 }, + [1] = { 0.5 , 0.0, 0.5, ratio=1, kanjiskip_stretch=1 }, + [2] = { 0, 0, 0, kanjiskip_shrink=1 }, [3] = { 0.25, 0.0, 0.25, priority=1, ratio=1 }, - [4] = { 0, 0, 0, ksp_shrink=1 }, - [6] = { 0, 0, 0, ksp_shrink=1 }, + [4] = { 0, 0, 0, kanjiskip_shrink=1 }, + [6] = { 0, 0, 0, kanjiskip_shrink=1 }, }, kern = { [8] = 0.0 diff --git a/src/ltj-jfmglue.lua b/src/ltj-jfmglue.lua index 6a9ed1a..a3b4a51 100644 --- a/src/ltj-jfmglue.lua +++ b/src/ltj-jfmglue.lua @@ -690,7 +690,7 @@ local function new_jfm_glue(m, bc, ac) local f = node_new(id_glue) set_attr(f, attr_icflag, g.priority) setfield(f, 'spec', node_copy(g[2])) - return f, g.ratio, g.ksp_natural, g.ksp_stretch, g.ksp_shrink + return f, g.ratio, g.kanjiskip_natural, g.kanjiskip_stretch, g.kanjiskip_shrink else return node_copy(g[2]), g.ratio, false, false, false end @@ -784,7 +784,7 @@ do local KANJI_SKIP_JFM = luatexja.icflag_table.KANJI_SKIP_JFM get_kanjiskip_low = function(flag, qm, bn, bp, bh) - if flag or (qm.ksp and (bn or bp or bh)) then + if flag or (qm.with_kanjiskip and (bn or bp or bh)) then if kanjiskip_jfm_flag then local g = node_new(id_glue); local gx = node_new(id_glue_spec); @@ -868,7 +868,7 @@ do local XKANJI_SKIP_JFM = luatexja.icflag_table.XKANJI_SKIP_JFM get_xkanjiskip_low = function(flag, qm, bn, bp, bh) - if flag or (qm.ksp and (bn or bp or bh)) then + if flag or (qm.with_kanjiskip and (bn or bp or bh)) then if xkanjiskip_jfm_flag then local g = node_new(id_glue); local gx = node_new(id_glue_spec); diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index dbe4254..17a2463 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -126,9 +126,9 @@ function define_jfm(t) if v.kern[j] then defjfm_res= nil; return end x.ratio, x[5] = (x.ratio or (x[5] and 0.5*(1+x[5]) or 0.5)), nil x.priority, x[4] = (x.priority or x[4] or 0), nil - x.ksp_natural = norm_val(x.ksp_natural) - x.ksp_stretch = norm_val(x.ksp_stretch) - x.ksp_shrink = norm_val(x.ksp_shrink) + x.kanjiskip_natural = norm_val(x.kanjiskip_natural) + x.kanjiskip_stretch = norm_val(x.kanjiskip_stretch) + x.kanjiskip_shrink = norm_val(x.kanjiskip_shrink) end for j,x in pairs(v.kern) do if type(x)=='number' then @@ -180,9 +180,9 @@ do true, h, ratio=w.ratio/sz, priority=FROM_JFM + w.priority/sz, - ksp_natural = w.ksp_natural and w.ksp_natural/sz, - ksp_stretch = w.ksp_stretch and w.ksp_stretch/sz, - ksp_shrink = w.ksp_shrink and w.ksp_shrink/sz, + kanjiskip_natural = w.kanjiskip_natural and w.kanjiskip_natural/sz, + kanjiskip_stretch = w.kanjiskip_stretch and w.kanjiskip_stretch/sz, + kanjiskip_shrink = w.kanjiskip_shrink and w.kanjiskip_shrink/sz, } setfield(h, 'width', w[1]) setfield(h, 'stretch', w[2]) @@ -296,7 +296,7 @@ do local ad = identifiers[fn].parameters local sz = metrics[j].size_cache[f.size] local fmtable = { jfm = j, size = f.size, var = jfm_var, - ksp = jfm_ksp, + with_kanjiskip = jfm_ksp, zw = sz.zw, zh = sz.zh, ascent = ad.ascender, descent = ad.descender, -- 2.11.0