diff --git a/source/texk/web2c/ptexdir/ptex-base.ch b/source/texk/web2c/ptexdir/ptex-base.ch index 67bb56c49..c4c0ea21e 100644 --- a/source/texk/web2c/ptexdir/ptex-base.ch +++ b/source/texk/web2c/ptexdir/ptex-base.ch @@ -7204,14 +7204,6 @@ end; @ This section is a part of |main_control|. @= -if is_char_node(tail) then - begin if not( (last_jchr<>null) and (link(last_jchr)=tail) ) then - begin cx:=qo(character(tail)); @; - end; - end -else if type(tail)=ligature_node then - begin cx:=qo(character(lig_char(tail))); @; - end; if direction=dir_tate then begin if font_dir[main_f]=dir_tate then disp:=0 else if font_dir[main_f]=dir_yoko then disp:=t_baseline_shift-y_baseline_shift @@ -7224,6 +7216,17 @@ else else disp:=y_baseline_shift; main_f:=cur_jfont; end; +if (type(tail)=disp_node)and(prev_node<>null)and(link(prev_node)=tail) then + begin disp:=disp_dimen(tail); gp:=prev_node; end +else gp:=tail; +if is_char_node(gp) then + begin if not( (last_jchr<>null) and (link(last_jchr)=gp) ) then + begin cx:=qo(character(gp)); @; + end; + end +else if type(gp)=ligature_node then + begin cx:=qo(character(lig_char(gp))); @; + end; @; ins_kp:=false; ligature_present:=false; cur_l:=qi(get_jfm_pos(KANJI(cur_chr),main_f)); diff --git a/source/texk/web2c/ptexdir/tests/kinsoku_around_word.tex b/source/texk/web2c/ptexdir/tests/kinsoku_around_word.tex index 4ce50d643..c16f6df83 100644 --- a/source/texk/web2c/ptexdir/tests/kinsoku_around_word.tex +++ b/source/texk/web2c/ptexdir/tests/kinsoku_around_word.tex @@ -8,17 +8,45 @@ \postbreakpenalty`\^^L=601 \postbreakpenalty`漢=6020 \prebreakpenalty`字=4020 +%\ybaselineshift=1pt -\setbox0=\hbox{.漢\relax.漢\null.漢.A{}.漢{}.\showlists} -\setbox0=\hbox{.字\relax.字\null.字.A{}.字{}.\showlists} +%\setbox0=\hbox{.漢\relax.漢\null.漢.A{}.漢{}.\showlists} +%\setbox0=\hbox{.字\relax.字\null.字.A{}.字{}.\showlists} -\setbox0=\hbox{,漢,\relax 漢\null,漢{},\showlists} -\setbox0=\hbox{,字,\relax 字\null,字{},\showlists} +%\setbox0=\hbox{,漢,\relax 漢\null,漢{},\showlists} +%\setbox0=\hbox{,字,\relax 字\null,字{},\showlists} -\setbox0=\hbox{あ.\null {あ}.\null あ{.}\null{あ}{.}\showlists} -\setbox0=\hbox{,あ\null ,{あ}\null {,}あ\null{,}{あ}\showlists} +\setbox0=\hbox{あ.\showlists}% => 901 期待 +\setbox0=\hbox{{あ}.\showlists}% => 901 期待 +\setbox0=\hbox{あ{.}\showlists}% => 901 期待 +\setbox0=\hbox{{あ}{.}\showlists}%=> 901 期待 + +\setbox0=\hbox{,あ\showlists}% => 801 期待 +\setbox0=\hbox{,{あ}\showlists}% => 801 期待 +\setbox0=\hbox{{,}あ\showlists}% => 801 期待 +\setbox0=\hbox{{,}{あ}\showlists}%=> 801 期待 + +{\ybaselineshift=1pt +\setbox0=\hbox{あ.\showlists}% => 901 期待 +\setbox0=\hbox{{あ}.\showlists}% => 901 期待 +\setbox0=\hbox{あ{.}\showlists}% => 901 期待 +\setbox0=\hbox{{あ}{.}\showlists}%=> 901 期待 + +\setbox0=\hbox{,あ\showlists}% => 801 期待 +\setbox0=\hbox{,{あ}\showlists}% => 801 期待 +\setbox0=\hbox{{,}あ\showlists}% => 801 期待 +\setbox0=\hbox{{,}{あ}\showlists}%=> 801 期待 + +\setbox0=\hbox{fiあ\showlists}% => +\setbox0=\hbox{fi{あ}\showlists}% => +\setbox0=\hbox{{fi}あ\showlists}% => +\setbox0=\hbox{{fi}{あ}\showlists}%=> +} + + +\setbox0=\hbox{漢f\showlists} % => 6721 (= 6020 + 701) +\setbox0=\hbox{fi字\showlists}% => 4621 (= 4020 + 601) -\setbox0=\hbox{漢f漢fi字\showlists} \bye \ No newline at end of file