From 0fcca72982e71e68b68f07007e58108402670519 Mon Sep 17 00:00:00 2001 From: Hironori Kitagawa Date: Sun, 25 Sep 2016 22:52:38 +0900 Subject: [PATCH] proportional vertical fonts --- doc/luatexja.dtx | 12 ++++++------ src/ltj-jfont.lua | 2 +- src/ltj-setwidth.lua | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/luatexja.dtx b/doc/luatexja.dtx index 9814a35..ce67c8c 100644 --- a/doc/luatexja.dtx +++ b/doc/luatexja.dtx @@ -4312,9 +4312,9 @@ This field is a list of characters which are in this character \toprule Direction of JFM&\textbf{\texttt{'yoko'} (horizontal)}&\multicolumn{1}{l}{\textbf{\texttt{'tate'} (vertical)}}\\ \midrule -\texttt{width} field&the width of the ``real'' glyph&1.0~(full-width)\\ -\texttt{height} field&the height of the ``real'' glyph&0.5~(half-width)\\ -\texttt{depth} field&the depth of the ``real'' glyph&0.5~(half-width)\\ +\texttt{width} field&\multicolumn{2}{c}{the width of the ``real'' glyph}\\ +\texttt{height} field&the height of the ``real'' glyph&0.0\\ +\texttt{depth} field&the depth of the ``real'' glyph&0.0\\ \midrule \texttt{italic} field&\multicolumn{2}{c}{0.0}\\ \bottomrule @@ -4333,9 +4333,9 @@ as values of these fields. The default values are shown in Table~\ref{tab-wid}. \toprule JFM書字方向&\emph{\texttt{'yoko'}(横組)}&\multicolumn{1}{l}{\emph{\texttt{'tate'}(縦組)}}\\ \midrule -\texttt{width}&「実際のグリフ」の幅&1.0(全角)\\ -\texttt{height}&「実際のグリフ」の高さ&0.5(二分)\\ -\texttt{depth}&「実際のグリフ」の深さ&0.5(二分)\\ +\texttt{width}&\multicolumn{2}{c}{「実際のグリフ」の幅}\\ +\texttt{height}&「実際のグリフ」の高さ&0.0\\ +\texttt{depth}&「実際のグリフ」の深さ&0.0\\ \midrule \texttt{italic}&\multicolumn{2}{c}{0.0}\\ \bottomrule diff --git a/src/ltj-jfont.lua b/src/ltj-jfont.lua index 7355c9e..1c77e82 100644 --- a/src/ltj-jfont.lua +++ b/src/ltj-jfont.lua @@ -87,7 +87,7 @@ function define_jfm(t) v.align = 'left' -- left end if type(v.width)~='number' then - v.width = (jfm_dir=='tate') and 1.0 + v.width = nil end if type(v.height)~='number' then v.height = (jfm_dir=='tate') and 0.0 diff --git a/src/ltj-setwidth.lua b/src/ltj-setwidth.lua index 9c783a5..2b0c29b 100644 --- a/src/ltj-setwidth.lua +++ b/src/ltj-setwidth.lua @@ -191,7 +191,7 @@ luatexja.setwidth.capsule_glyph_tate = capsule_glyph_tate local function capsule_glyph_math(p, met, char_data) if not char_data then return nil end local fwidth, pwidth = char_data.width, getfield(p, 'width') - fwidth = (fwidth ~= 'prop') and fwidth or pwidth + fwidth = fwidth or pwidth fshift.down = char_data.down; fshift.left = char_data.left fshift = call_callback("luatexja.set_width", fshift, met, char_data) local fheight, fdepth = char_data.height, char_data.depth -- 2.11.0