Skip to content

Commit

Permalink
[uptex] improve lig/kern for charcode>255 (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
t-tk committed Jul 14, 2024
1 parent e127d79 commit 5fe2674
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions source/texk/web2c/uptexdir/uptex-m.ch
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,13 @@ begin
@!repeat_no,@!table_counter:integer;
@z

@x
@!a,@!b,@!c,@!d:eight_bits; {byte variables}
@y
@!a,@!b,@!c,@!d:eight_bits; {byte variables}
@!ai,@!bi,@!ci,@!di:integer; {byte variables}
@z

@x
if file_opened then print(" not loadable: Bad metric (TFM) file")
else if name_too_long then print(" not loadable: Metric (TFM) file name too long")
Expand Down Expand Up @@ -1203,11 +1210,11 @@ if not ofm_open_in(tfm_file) then
end
@d store_four_quarters(#)==begin
if (ofm_flag<>0) then begin
fget; read_sixteen_unsigned(a); qw.b0:=a;
fget; read_sixteen_unsigned(b); qw.b1:=b;
fget; read_sixteen_unsigned(c); qw.b2:=c;
fget; read_sixteen_unsigned(d); qw.b3:=d;
#:=qw
fget; read_sixteen_unsigned(ai); qw.b0:=ai;
fget; read_sixteen_unsigned(bi); qw.b1:=bi;
fget; read_sixteen_unsigned(ci); qw.b2:=ci;
fget; read_sixteen_unsigned(di); qw.b3:=di;
#:=qw; a:=ai; b:=bi; c:=ci; d:=di
end
else begin
fget; a:=fbyte; qw.b0:=qi(a);
Expand Down Expand Up @@ -1553,6 +1560,23 @@ while k<=width_base[f]-1 do
end
@z

@x
@<Read ligature/kern program@>=
bch_label:=@'77777; bchar:=256;
@y
@<Read ligature/kern program@>=
bch_label:=@'77777; bchar:=max_latin_val;
@z

@x
if a=255 then bch_label:=256*c+d;
end;
@y
if a=255 then bch_label:=256*c+d;
end;
bchar:=256;
@z

@x
adjust(ctype_base);
adjust(char_base); adjust(width_base); adjust(lig_kern_base);
Expand Down

0 comments on commit 5fe2674

Please sign in to comment.