summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/pdftexdir/ChangeLog20
-rw-r--r--Build/source/texk/web2c/pdftexdir/NEWS2
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftex.web45
3 files changed, 60 insertions, 7 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog
index 816bb729bda..d9adc6ab40e 100644
--- a/Build/source/texk/web2c/pdftexdir/ChangeLog
+++ b/Build/source/texk/web2c/pdftexdir/ChangeLog
@@ -1,8 +1,26 @@
+2021-09-03 Thanh Han The <hanthethanh@gmail.com>
+
+ * pdftex.web (prev_tail): new global.
+ (tail_append): maintain it.
+ (insert_before_tail): new macro.
+ (If |tmp_k1| is not null...): insert auto-kern before a
+ null discretionary inserted by |wrapup| (i.e., explicit hyphen)
+ if appropriate. Report (2) from Robert Schlicht.
+ https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-August/004338.html
+
+2021-09-03 Thanh Han The <hanthethanh@gmail.com>
+
+ * pdftex.web (append_discretionary): insert autokern
+ (\pdfprependkern/pdfappendkern) after
+ hyphen char inserted by hyphenation. Report (3) from Robert Schlicht.
+ https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-August/004338.html
+
2021-08-21 Thanh Han The <hanthethanh@gmail.com>
* pdftex.web (cp_skipable): make autokerns "skipable", so character
protrusion works with chars having autokern
- (\pdfprependkern/\pdfappendkern).
+ (\pdfprependkern/\pdfappendkern). Report (1) and patch from
+ Robert Schlicht,
https://mailman.ntg.nl/pipermail/ntg-pdftex/2021-August/004338.html
2021-07-13 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
diff --git a/Build/source/texk/web2c/pdftexdir/NEWS b/Build/source/texk/web2c/pdftexdir/NEWS
index 11214d247cf..28e77abde27 100644
--- a/Build/source/texk/web2c/pdftexdir/NEWS
+++ b/Build/source/texk/web2c/pdftexdir/NEWS
@@ -6,7 +6,7 @@ pdfTeX 3.141592653-2.6-1.40.23 (TeX Live 2021 post-release) (June 28, 2021)
- make .fmt files sharable between 4/8-byte architectures.
- for \letterspacefont, avoid problem with single-character control sequence.
- for characters with autokern (\pdfappendkern and \pdfprependkern),
- still do protrusion.
+ still do protrusion; likewise autokern implicit and explicit hyphens.
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021) (March 23, 2021)
- changes:
diff --git a/Build/source/texk/web2c/pdftexdir/pdftex.web b/Build/source/texk/web2c/pdftexdir/pdftex.web
index 99ccc6511f5..44f464420fe 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftex.web
+++ b/Build/source/texk/web2c/pdftexdir/pdftex.web
@@ -4983,11 +4983,17 @@ be pushed onto |nest| if necessary.
@!shown_mode:-mmode..mmode; {most recent mode shown by \.{\\tracingcommands}}
@!save_tail: pointer; {save |tail| so we can examine whether we have an auto
kern before a glue}
+@!prev_tail: pointer; {value of |tail| before the last call to |tail_append|}
@ Here is a common way to make the current list grow:
-@d tail_append(#)==begin link(tail):=#; tail:=link(tail);
+@d tail_append(#)==begin prev_tail:=tail; link(tail):=#; tail:=link(tail);
end
+@d insert_before_tail(#) == begin
+ link(prev_tail) := #;
+ link(#) := tail;
+ prev_tail := #;
+end
@ We will see later that the vertical list at the bottom semantic level is split
into two parts; the ``current page'' runs from |page_head| to |page_tail|,
@@ -24389,7 +24395,8 @@ distinguishable by the condition |cur_p=null|.
(replace_count(#) = 0)) {an empty |disc_node|}
or ((type(#) = math_node) and (width(#) = 0))
or ((type(#) = kern_node) and
- ((width(#) = 0) or (subtype(#) = normal) or (subtype(#) = auto_kern)))
+ ((width(#) = 0) or (subtype(#) = normal)
+ or (subtype(#) = auto_kern)))
or ((type(#) = glue_node) and (glue_ptr(#) = zero_glue))
or ((type(#) = hlist_node) and (width(#) = 0) and (height(#) = 0) and
(depth(#) = 0) and (list_ptr(#) = null))
@@ -28824,9 +28831,20 @@ goto main_lig_loop+1
@ @<If |tmp_k1| is not null then append that kern@>=
if tmp_k1 <> null then begin
- wrapup(rt_hit);
+ wrapup(rt_hit); {Note: |wrapup| might insert a null discretionary}
save_tail := tail;
- tail_append(tmp_k1);
+ {insert auto-kern before a null discretionary inserted by |wrapup| if appropriate}
+ if (not is_char_node(tail))
+ and (type(tail) = disc_node)
+ and (replace_count(tail) = 0)
+ and (pre_break(tail) = null)
+ and (post_break(tail) = null)
+ and (link(prev_tail) = tail) then
+ begin
+ insert_before_tail(tmp_k1);
+ end
+ else
+ tail_append(tmp_k1);
goto main_loop_move;
end
@@ -30044,10 +30062,27 @@ but it starts out as 1000 in the subsidiary lists.
@<Declare act...@>=
procedure append_discretionary;
var c:integer; {hyphen character}
+ app_kern, pre_kern, p, c_node: pointer;
begin tail_append(new_disc);
if cur_chr=1 then
begin c:=hyphen_char[cur_font];
- if c>=0 then if c<256 then pre_break(tail):=new_character(cur_font,c);
+ if c>=0 then if c<256 then begin
+ pre_kern := get_auto_kern(cur_font, non_char, c);
+ app_kern := get_auto_kern(cur_font, c, non_char);
+ c_node := new_character(cur_font,c);
+ if (app_kern = null) and (pre_kern = null) then {no auto-kern}
+ pre_break(tail) := c_node
+ else begin
+ if pre_kern = null then
+ pre_break(tail) := c_node
+ else begin
+ pre_break(tail) := pre_kern;
+ link(pre_kern) := c_node;
+ end;
+ if app_kern <> null then
+ link(c_node) := app_kern;
+ end;
+ end;
end
else begin incr(save_ptr); saved(-1):=0; new_save_level(disc_group);
scan_left_brace; push_nest; mode:=-hmode; space_factor:=1000;