Skip to content

Commit

Permalink
ptex-base.ch: support huge GLUEKERN table with rearrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Jan 29, 2018
1 parent 6d29e14 commit c761318
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions source/texk/web2c/ptexdir/ptex-base.ch
Original file line number Diff line number Diff line change
Expand Up @@ -2705,10 +2705,15 @@ in the |glue_kern| array. And a \.{JFM} does not use |tag=2| and |tag=3|.
@x [30.557] l.11413 - pTeX: glue_kern_start
@d lig_kern_start(#)==lig_kern_base[#]+rem_byte {beginning of lig/kern program}
@d lig_kern_restart_end(#)==256*op_byte(#)+rem_byte(#)+32768-kern_base_offset
@d lig_kern_restart(#)==lig_kern_base[#]+lig_kern_restart_end
@y
@d lig_kern_start(#)==lig_kern_base[#]+rem_byte {beginning of lig/kern program}
@d glue_kern_start(#)==lig_kern_base[#]+rem_byte
{beginning of glue/kern program}
@d lig_kern_restart_end(#)==256*op_byte(#)+rem_byte(#)+32768-kern_base_offset
@d lig_kern_restart(#)==lig_kern_base[#]+lig_kern_restart_end
@d glue_kern_start(#)==lig_kern_base[#]+rem_byte {beginning of glue/kern program}
@d glue_kern_restart_end(#)==256*op_byte(#)+rem_byte(#)+32768-kern_base_offset
@d glue_kern_restart(#)==lig_kern_base[#]+glue_kern_restart_end
@z
@x [30.560] l.11457 - pTeX: jfm_flag, jfm_id, nt, cx
Expand Down Expand Up @@ -3926,6 +3931,10 @@ if (math_type(subscr(q))=empty)and(math_type(supscr(q))=empty)and@|
{|cur_c|:=qi(|get_jfm_pos|(|math_kcode|(p),
|fam_fnt|(fam(nucleus(p))+|cur_size|)));}
cur_i:=font_info[a].qqqq;
if skip_byte(cur_i)>stop_flag then {huge glue/kern table rearranged}
begin a:=glue_kern_restart(cur_f)(cur_i);
cur_i:=font_info[a].qqqq;
end;
loop@+ begin
if next_char(cur_i)=cur_c then
if op_byte(cur_i)<kern_flag then
Expand All @@ -3951,7 +3960,7 @@ if (math_type(subscr(q))=empty)and(math_type(supscr(q))=empty)and@|
link(p):=link(q); link(q):=p; return;
end;
if skip_byte(cur_i)>=stop_flag then return;
a:=a+qo(skip_byte(cur_i))+1;
a:=a+qo(skip_byte(cur_i))+1; {SKIP property}
cur_i:=font_info[a].qqqq;
end;
end;
Expand Down Expand Up @@ -7215,6 +7224,10 @@ if inhibit_glue_flag<>true then
begin if char_tag(main_i)=gk_tag then
begin main_k:=glue_kern_start(main_f)(main_i);
main_j:=font_info[main_k].qqqq;
if skip_byte(main_j)>stop_flag then {huge glue/kern table rearranged}
begin main_k:=lig_kern_restart(main_f)(main_j);
main_j:=font_info[main_k].qqqq;
end;
loop@+begin if next_char(main_j)=cur_l then
begin if op_byte(main_j)<kern_flag then
begin gp:=font_glue[main_f]; cur_r:=rem_byte(main_j);
Expand Down Expand Up @@ -7245,7 +7258,7 @@ if inhibit_glue_flag<>true then
end;
end;
if skip_byte(main_j)>=stop_flag then goto skip_loop;
main_k:=main_k+qo(skip_byte(main_j))+1;
main_k:=main_k+qo(skip_byte(main_j))+1; {SKIP property}
main_j:=font_info[main_k].qqqq;
end;
end;
Expand Down

0 comments on commit c761318

Please sign in to comment.