Skip to content

Commit

Permalink
JIS-UCS conversion of JFM for DVI output (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
aminophen committed Oct 15, 2022
1 parent b12ec8d commit 4baff60
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions source/texk/web2c/eptexdir/eptex.defines
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@define function fromKUTEN ();
@define function UCStoUTF8 ();
@define function fromUCS ();
@define function toJIS ();
@define function toUCS ();

@define function notkanjicharseq ();
Expand Down
1 change: 1 addition & 0 deletions source/texk/web2c/euptexdir/euptex.defines
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
@define function fromKUTEN ();
@define function fromUCS ();
@define function UCStoUTF8 ();
@define function toJIS ();
@define function toUCS ();

@define function notkanjicharseq ();
Expand Down
8 changes: 7 additions & 1 deletion source/texk/web2c/ptexdir/ptex-base.ch
Original file line number Diff line number Diff line change
Expand Up @@ -3510,7 +3510,13 @@ continue:
synch_h;
end;
p:=link(p);
jc:=toDVI(KANJI(info(p)));
jc:=KANJI(info(p));
if font_enc[f]=2 then {Unicode TFM}
jc:=toUCS(jc)
else if font_enc[f]=1 then {JIS-encoded TFM}
jc:=toJIS(jc)
else
jc:=toDVI(jc);
dvi_out(set2); dvi_out(Hi(jc)); dvi_out(Lo(jc));
cur_h:=cur_h+char_width(f)(orig_char_info(f)(c)); {not |jc|}
end;
Expand Down
1 change: 1 addition & 0 deletions source/texk/web2c/ptexdir/ptex.defines
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
@define function fromSJIS ();
@define function fromKUTEN ();
@define function fromUCS ();
@define function toJIS ();
@define function toUCS ();

@define function notkanjicharseq ();
Expand Down
8 changes: 6 additions & 2 deletions source/texk/web2c/uptexdir/uptex-m.ch
Original file line number Diff line number Diff line change
Expand Up @@ -757,10 +757,14 @@ if (cur_cmd>=kanji)and(cur_cmd<=hangul) then
@z
@x
jc:=toDVI(KANJI(info(p)));
jc:=KANJI(info(p));
@y
jc:=KANJI(info(p)) mod max_cjk_val;
@z
@x
dvi_out(set2); dvi_out(Hi(jc)); dvi_out(Lo(jc));
@y
jc:=toDVI(KANJI(info(p)) mod max_cjk_val);
if (jc<@"10000) then begin
dvi_out(set2);
end else begin
Expand Down
1 change: 1 addition & 0 deletions source/texk/web2c/uptexdir/uptex.defines
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
@define function fromSJIS ();
@define function fromKUTEN ();
@define function fromUCS ();
@define function toJIS ();
@define function toUCS ();

@define function notkanjicharseq ();
Expand Down

0 comments on commit 4baff60

Please sign in to comment.