diff options
author | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2024-04-27 10:52:08 +0000 |
---|---|---|
committer | Takuji Tanaka <ttk@t-lab.opal.ne.jp> | 2024-04-27 10:52:08 +0000 |
commit | 19365c9187c659d1562383b57dc93644ce653f8e (patch) | |
tree | 121fc36b958def82216d70beb677edcb7c936769 /Build/source/texk/web2c | |
parent | 1be21c7025d9c7f70303a237a4f8e6a7a00e232a (diff) |
upTeX 1.35: Support combining characters
git-svn-id: svn://tug.org/texlive/trunk@71092 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
29 files changed, 1274 insertions, 167 deletions
diff --git a/Build/source/texk/web2c/Makefile.in b/Build/source/texk/web2c/Makefile.in index 3db189aaa7f..1e42d352af3 100644 --- a/Build/source/texk/web2c/Makefile.in +++ b/Build/source/texk/web2c/Makefile.in @@ -3224,18 +3224,21 @@ EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h \ $(upweb_tests) tests/enc-u.bbl tests/enc-eu.bbl \ tests/enc-su.bbl tests/enc-uu.bbl uptexdir/tests/uptex3.tex \ uptexdir/tests/uptex3.dvi uptexdir/tests/uptex4.tex \ - uptexdir/tests/uptex4.dvi uptexdir/tests/uptex3a.typ \ - uptexdir/tests/uptex4a.typ uptexdir/tests/umin10.pl \ - uptexdir/tests/umin10.tfm uptexdir/tests/utmin10.pl \ - uptexdir/tests/utmin10.tfm uptexdir/tests/testnewu.pl \ - uptexdir/tests/testnewu.tfm uptexdir/tests/uparse.pl \ - uptexdir/tests/uparse.tfm uptexdir/tests/gkhugeok.tfm \ - uptexdir/tests/gkhugeng.tfm uptexdir/tests/gkhugeng.err \ - uptexdir/tests/gk256g.tfm uptexdir/tests/gk256k.tfm \ - uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf \ - $(euptex_web_srcs) $(euptex_ch_srcs) euptexdir/euptex.defines \ - euptexdir/COPYRIGHT euptexdir/COPYRIGHT.jis \ - euptexdir/ChangeLog euptexdir/EUPTEX.txt $(euptex_tests) \ + uptexdir/tests/uptex4.dvi uptexdir/tests/uptex5.tex \ + uptexdir/tests/uptex5.dvi uptexdir/tests/uptex3a.typ \ + uptexdir/tests/uptex4a.typ uptexdir/tests/uptex5a.typ \ + uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm \ + uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm \ + uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm \ + uptexdir/tests/testnewu8.pl uptexdir/tests/testnewu8.tfm \ + uptexdir/tests/uparse.pl uptexdir/tests/uparse.tfm \ + uptexdir/tests/gkhugeok.tfm uptexdir/tests/gkhugeng.tfm \ + uptexdir/tests/gkhugeng.err uptexdir/tests/gk256g.tfm \ + uptexdir/tests/gk256k.tfm uptexdir/uptrip/uptrip.diffs \ + uptexdir/uptrip/texmf.cnf $(euptex_web_srcs) $(euptex_ch_srcs) \ + euptexdir/euptex.defines euptexdir/COPYRIGHT \ + euptexdir/COPYRIGHT.jis euptexdir/ChangeLog \ + euptexdir/EUPTEX.txt $(euptex_tests) \ euptexdir/eptrip/eptrip.log euptexdir/eptrip/eptrip.tex \ euptexdir/euptrip/euptrip.diffs euptexdir/euptrip/texmf.cnf \ euptexdir/pdfprimitive.test \ @@ -3557,9 +3560,9 @@ DISTCLEANFILES = CXXLD.sh tangle.c tangle.h tangle.p tangle-web2c \ uptests/nissya_bib.* uptests/xexampl.aux uptests/xexampl.bbl \ uptests/xexampl.blg uptests/xenc*.* uptests/fn*.* \ uptests/memtest.bib uptests/memtest?.* uptests/xstory.dvityp \ - uptests/xpagenum.typ uptests/x*ptex[34]*.typ \ + uptests/xpagenum.typ uptests/x*ptex[345]*.typ \ uptests/xcmr10.tfm uptests/xcmr10.pl uptests/xsample*.typ \ - uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu.* \ + uptests/x*min10.* uptests/xchcode*.* uptests/xtestnewu*.* \ uptests/xuparse.* uptests/yuparse.* uptests/ygkhuge*.* \ uptests/ygk256*.* uptests/xskipjfmp.* uptrip.diffs \ $(nodist_euptex_SOURCES) euptex.web euptex.ch euptex-web2c \ diff --git a/Build/source/texk/web2c/euptexdir/COPYRIGHT b/Build/source/texk/web2c/euptexdir/COPYRIGHT index 3dfc192a17f..88d900edbde 100644 --- a/Build/source/texk/web2c/euptexdir/COPYRIGHT +++ b/Build/source/texk/web2c/euptexdir/COPYRIGHT @@ -1,6 +1,6 @@ Copyright (C) 2009 ASCII MEDIA WORKS. -Copyright (C) 2007-2023 Takuji Tanaka -Copyright (C) 2010-2023 Japanese TeX Development Community +Copyright (C) 2007-2024 Takuji Tanaka +Copyright (C) 2010-2024 Japanese TeX Development Community All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Build/source/texk/web2c/euptexdir/ChangeLog b/Build/source/texk/web2c/euptexdir/ChangeLog index 27ee3ab5b38..136715e33be 100644 --- a/Build/source/texk/web2c/euptexdir/ChangeLog +++ b/Build/source/texk/web2c/euptexdir/ChangeLog @@ -1,3 +1,11 @@ +2024-04-27 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * eptex.ech, pdfutils.ch, euptex.defines: + Support new encoding of upTeX for combining characters + with multiple codepoints. + https://github.com/texjporg/tex-jp-build/issues/46 + * COPYRIGHT: copyright year. + 2024-04-24 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * eptex.ech, etex.ch1, euptex.ch{0,1}, diff --git a/Build/source/texk/web2c/euptexdir/eptex.ech b/Build/source/texk/web2c/euptexdir/eptex.ech index cf6878cb1e5..a33ecad2bf3 100644 --- a/Build/source/texk/web2c/euptexdir/eptex.ech +++ b/Build/source/texk/web2c/euptexdir/eptex.ech @@ -719,10 +719,11 @@ if j=1 then begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc); cur_tok:=kcat_code(kcatcodekey(cur_chr)); if (multistrlen(ustringcast(buffer), limit+1,loc)>1)and - check_kcat_code(cur_tok) then + check_kcat_code(cur_tok,cur_chr) then begin if (cur_tok=not_cjk) then cur_tok:=other_kchar; - cur_tok:=cur_chr+cur_tok*max_cjk_val; - loc:=loc+multistrlen(ustringcast(buffer), limit+1,loc); + if (cur_tok=latin_ucs) then cur_tok:=other_token; + cur_tok:=cur_chr+cur_tok*max_cjk_val; + loc:=loc+multistrlen(ustringcast(buffer), limit+1,loc); end else begin cur_chr:=buffer[loc]; incr(loc); if cur_chr=" " then cur_tok:=space_token diff --git a/Build/source/texk/web2c/euptexdir/euptex.defines b/Build/source/texk/web2c/euptexdir/euptex.defines index 20cee2a50ff..61e48d123bb 100644 --- a/Build/source/texk/web2c/euptexdir/euptex.defines +++ b/Build/source/texk/web2c/euptexdir/euptex.defines @@ -29,6 +29,9 @@ @define function fputs2 (); @define function inputline2 (); @define function ptencconvfirstline (); +@define function UVScombinecode (); +@define function UVSgetcodepointlength (); +@define function UVSgetcodepointinsequence (); @define function setinfileenc (); @define function setstdinenc (); @@ -48,6 +51,8 @@ @define function ischarkanji (); @define function ismultiprn (); @define function calcpos (); +@define function ktokentocmd (); +@define function ktokentochr (); @define function kcatcodekey (); @define function multilenbuffchar (); @define function nrestmultichr (); diff --git a/Build/source/texk/web2c/euptexdir/pdfutils.ch b/Build/source/texk/web2c/euptexdir/pdfutils.ch index 7324dd29b66..1f39749cd8a 100644 --- a/Build/source/texk/web2c/euptexdir/pdfutils.ch +++ b/Build/source/texk/web2c/euptexdir/pdfutils.ch @@ -882,7 +882,7 @@ function str_toks_cat(@!b:pool_pointer;@!cat:small_number):pointer; @x if (cc=not_cjk) then cc:=other_kchar; @y - if cat>=kanji then cc:=cat else if (cc=not_cjk) then cc:=other_kchar; + if (cat>=kanji)and(cat<=modifier) then cc:=cat else if (cc=not_cjk) then cc:=other_kchar; @z @x \Ucharcat: str_toks_cat @@ -890,7 +890,7 @@ function str_toks_cat(@!b:pool_pointer;@!cat:small_number):pointer; else t:=other_token+t; @y if (t=" ")and(cat=0) then t:=space_token - else if (cat=0)or(cat>=kanji) then t:=other_token+t + else if (cat=0)or((cat>=kanji)and(cat<=modifier)) then t:=other_token+t else if cat=active_char then t:= cs_token_flag + active_base + t else t:=left_brace_token*cat+t; @z @@ -968,7 +968,7 @@ we have to create a temporary string that is destroyed immediately after. @ Not all catcode values are allowed by \.{\\Ucharcat}: @d illegal_Ucharcat_ascii_catcode(#)==(#<left_brace)or(#>active_char)or(#=out_param)or(#=ignore) -@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>hangul) +@d illegal_Ucharcat_wchar_catcode(#)==(#<kanji)or(#>modifier) @p procedure conv_toks; @z @@ -1156,7 +1156,7 @@ uniform_deviate_code: scan_int; normal_deviate_code: do_nothing; Uchar_convert_code: begin scan_char_num; if not is_char_ascii(cur_val) then - if kcat_code(kcatcodekey(cur_val))=not_cjk then cat:=other_kchar; + if kcat_code(kcatcodekey(cur_val))=not_cjk then cat:=other_kchar; end; Ucharcat_convert_code: begin @@ -1188,7 +1188,7 @@ Ucharcat_convert_code: help1("I'm going to use 18 instead of that illegal code value.");@/ error; cat:=other_kchar; end else cat:=cur_val; - end; + end; cur_val:=i; end; @z @@ -1883,27 +1883,6 @@ if_font_char_code:begin scan_font_ident; n:=cur_val; @z @x -procedure print_kanji(@!s:KANJI_code); {prints a single character} -begin -s:=toBUFF(s mod max_cjk_val); -if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); -if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); -if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); -end; -@y -procedure print_kanji(@!s:KANJI_code); {prints a single character} -begin -if isprint_utf8 then s:=UCStoUTF8(toUCS(s mod max_cjk_val)) -else s:=toBUFF(s mod max_cjk_val); -if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); -if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); -if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); -end; -@z - -@x @* \[54] System-dependent changes. @y @* \[54/pdf\TeX] System-dependent changes for {\tt\char"5Cpdfstrcmp}. diff --git a/Build/source/texk/web2c/uptexdir/COPYRIGHT b/Build/source/texk/web2c/uptexdir/COPYRIGHT index 69ce22345dc..0e73780c566 100644 --- a/Build/source/texk/web2c/uptexdir/COPYRIGHT +++ b/Build/source/texk/web2c/uptexdir/COPYRIGHT @@ -1,5 +1,5 @@ Copyright (C) 2009 ASCII MEDIA WORKS. -Copyright (C) 2007-2023 Takuji Tanaka +Copyright (C) 2007-2024 Takuji Tanaka All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Build/source/texk/web2c/uptexdir/ChangeLog b/Build/source/texk/web2c/uptexdir/ChangeLog index 7f40079d674..5ca5f7b8b76 100644 --- a/Build/source/texk/web2c/uptexdir/ChangeLog +++ b/Build/source/texk/web2c/uptexdir/ChangeLog @@ -1,3 +1,20 @@ +2024-04-27 TANAKA Takuji <ttk@t-lab.opal.ne.jp> + + * uptex-m.ch, kanji.{c,h}, updvitype.ch, uptex.defines: + Support new encoding of upTeX for combining characters + with multiple codepoints. + Trial of Unicode Latin characters (experimental). + New kcatcodes (latin_ucs(14), modifier(20)) are added. + * {uppltotf,uptftopl,updvitype}.ch: Version p240427. + Support upTeX new encoding for combining characters. + * newjfm.test, updvitype.test, tests/kcat.tex, tests/upkcat.txt, + tests/uptex5.{tex,dvi}, tests/uptex5a.typ, + tests/testnewu{,8}.{pl,tfm}, am/uptex.am: Update tests. + * uptex-m.ch, upbibtex.ch, uptex_version.h: + upTeX version u1.35. + https://github.com/texjporg/tex-jp-build/issues/46 + * COPYRIGHT: copyright year. + 2024-04-14 TANAKA Takuji <ttk@t-lab.opal.ne.jp> * {,u}ptriptest.test: diff --git a/Build/source/texk/web2c/uptexdir/am/uptex.am b/Build/source/texk/web2c/uptexdir/am/uptex.am index 4df5f0850b2..1a4ee00d4c0 100644 --- a/Build/source/texk/web2c/uptexdir/am/uptex.am +++ b/Build/source/texk/web2c/uptexdir/am/uptex.am @@ -232,8 +232,10 @@ DISTCLEANFILES += uptests/memtest.bib uptests/memtest?.* ## uptexdir/updvitype.test EXTRA_DIST += uptexdir/tests/uptex3.tex uptexdir/tests/uptex3.dvi \ uptexdir/tests/uptex4.tex uptexdir/tests/uptex4.dvi \ - uptexdir/tests/uptex3a.typ uptexdir/tests/uptex4a.typ -DISTCLEANFILES += uptests/xstory.dvityp uptests/xpagenum.typ uptests/x*ptex[34]*.typ + uptexdir/tests/uptex5.tex uptexdir/tests/uptex5.dvi \ + uptexdir/tests/uptex3a.typ uptexdir/tests/uptex4a.typ \ + uptexdir/tests/uptex5a.typ +DISTCLEANFILES += uptests/xstory.dvityp uptests/xpagenum.typ uptests/x*ptex[345]*.typ ## uptexdir/uppltotf.test DISTCLEANFILES += uptests/xcmr10.tfm ## uptexdir/uptftopl.test @@ -245,8 +247,9 @@ EXTRA_DIST += uptexdir/tests/umin10.pl uptexdir/tests/umin10.tfm EXTRA_DIST += uptexdir/tests/utmin10.pl uptexdir/tests/utmin10.tfm DISTCLEANFILES += uptests/x*min10.* uptests/xchcode*.* ## uptexdir/newjfm.test -EXTRA_DIST += uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm -DISTCLEANFILES += uptests/xtestnewu.* +EXTRA_DIST += uptexdir/tests/testnewu.pl uptexdir/tests/testnewu.tfm \ + uptexdir/tests/testnewu8.pl uptexdir/tests/testnewu8.tfm +DISTCLEANFILES += uptests/xtestnewu*.* ## uptexdir/uparse.test EXTRA_DIST += uptexdir/tests/uparse.pl uptexdir/tests/uparse.tfm DISTCLEANFILES += uptests/xuparse.* uptests/yuparse.* diff --git a/Build/source/texk/web2c/uptexdir/kanji.c b/Build/source/texk/web2c/uptexdir/kanji.c index 66bd8704479..ddeca5a535c 100644 --- a/Build/source/texk/web2c/uptexdir/kanji.c +++ b/Build/source/texk/web2c/uptexdir/kanji.c @@ -6,17 +6,36 @@ #include "kanji.h" #define CS_TOKEN_FLAG 0x1FFFFFFF +#define IVS_CHAR_LIMIT 0x4400000 #define CJK_CHAR_LIMIT 0x1000000 +#define UCS_CHAR_LIMIT 0x120000 #define CJK_TOKEN_FLAG 0xFFFFFF +#define CAT_LEFT_BRACE 1 +#define CAT_DELIM_NUM 15 #define KCAT_KANJI 16 -#define KCAT_HANGUL 19 +#define KCAT_MODIFIER 20 +#define KCAT_KANJI_IVS 23 /* TOKEN */ boolean check_kanji (integer c) { + integer c0, c1; + if (c >= CS_TOKEN_FLAG) return false; - else if (!(XXHi(c)>=KCAT_KANJI && XXHi(c)<=KCAT_HANGUL)) return false; - else return is_char_kanji(c & CJK_TOKEN_FLAG); + + c0 = c & CJK_TOKEN_FLAG; + c1 = XXHi(c); + if (c1>=CAT_LEFT_BRACE && c1<=CAT_DELIM_NUM && + c0 < UCS_CHAR_LIMIT) { + return is_char_kanji(c0); + } + else if (c1>=KCAT_KANJI && c1<=KCAT_MODIFIER) { + return is_char_kanji(c0); + } + else if (c1>=KCAT_KANJI_IVS+1 && c1<=KCAT_KANJI_IVS+4) { + return is_char_kanji(c - KCAT_KANJI_IVS * CJK_CHAR_LIMIT); + } + return false; } boolean is_char_ascii(integer c) @@ -27,7 +46,7 @@ boolean is_char_ascii(integer c) boolean is_char_kanji(integer c) { if (is_internalUPTEX()) - return ((c >= 0)&&(c<CJK_CHAR_LIMIT)); + return ((c >= 0)&&(c<IVS_CHAR_LIMIT)); else return iskanji1(Hi(c)) && iskanji2(Lo(c)); } @@ -55,6 +74,22 @@ integer calc_pos(integer c) return(c1 + c2); /* ret = 0..255 */ } +integer ktoken_to_cmd(integer c) +{ + if (c > KCAT_KANJI_IVS * CJK_CHAR_LIMIT) + return KCAT_KANJI; + else + return (c / CJK_CHAR_LIMIT); +} + +integer ktoken_to_chr(integer c) +{ + if (c > KCAT_KANJI_IVS * CJK_CHAR_LIMIT) + return (c - KCAT_KANJI_IVS * CJK_CHAR_LIMIT); + else + return (c % CJK_CHAR_LIMIT); +} + /* Ref. http://www.unicode.org/Public/UNIDATA/Blocks.txt */ /* # Blocks-15.1.0.txt */ /* # Date: 2023-07-28, 15:47:20 GMT */ @@ -396,6 +431,7 @@ static long ucs_range[]={ 0xD0000, /* reserved */ 0xE0000, /* Tags */ 0xE0100, /* Variation Selectors Supplement */ /* 0x150 */ + 0xE01F0, /* reserved */ 0xF0000, /* Supplementary Private Use Area-A */ 0x100000, /* Supplementary Private Use Area-B */ /* Value over 0x10FFFF is illegal under Unicode, @@ -412,13 +448,21 @@ static long ucs_range[]={ 0x1A0000, /* Reserved */ 0x1B0000, /* Reserved */ 0x1C0000, /* Reserved */ - 0x1D0000, /* Reserved */ - 0x1E0000, /* Reserved */ /* 0x160 */ + 0x1D0000, /* Reserved */ /* 0x160 */ + 0x1E0000, /* Reserved */ 0x1F0000, /* Reserved */ 0x200000, /* Reserved */ 0x210000, /* Reserved */ - 0x220000, /* Reserved */ /* 0x164 */ - CJK_CHAR_LIMIT + 0x220000, /* Kana with Voiced Sound Mark */ + 0x240000, /* Kana with Semi-Voiced Sound Mark */ + 0x25E6E6, /* Emoji Flag Sequence */ + 0x260000, /* Emoji with Modifier Fitzpatrick */ + 0x300000, /* Reserved */ + 0x400000, /* Standardized Variation Sequence */ + 0x800000, /* Emoji Keycap Sequence */ + 0x800080, /* Ideographic Variation Sequence */ /* 0x16C */ + CJK_CHAR_LIMIT, /* Ideographic Variation Sequence, VS49..VS256 */ + IVS_CHAR_LIMIT }; #define NUCS_RANGE (sizeof(ucs_range)/sizeof(ucs_range[0])) @@ -447,6 +491,9 @@ binary_search (long x, long *a, int left, int right) #define LATIN_SMALL_LETTER_O_WITH_DIAERESIS 0x00F6 #define LATIN_SMALL_LETTER_O_WITH_STROKE 0x00F8 #define LATIN_SMALL_LETTER_Y_WITH_DIAERESIS 0x00FF +#define COMBINING_ENCLOSING_KEYCAP 0x20E3 +#define COMBINING_KANA_VOICED_SOUND_MARK 0x3099 +#define COMBINING_KANA_SEMI_VOICED_SOUND_MARK 0x309A #define FULLWIDTH_DIGIT_0 0xFF10 #define FULLWIDTH_DIGIT_9 0xFF19 #define FULLWIDTH_CAPITAL_A 0xFF21 @@ -457,13 +504,18 @@ binary_search (long x, long *a, int left, int right) #define HALFWIDTH_KATAKANA_SMALL_TSU 0xFF6F #define HALFWIDTH_KATAKANA_A 0xFF71 #define HALFWIDTH_KATAKANA_N 0xFF9D +#define REGIONAL_INDICATOR_SYMBOL_LETTER_A 0x1F1E6 +#define REGIONAL_INDICATOR_SYMBOL_LETTER_Z 0x1F1FF +#define EMOJI_MODIFIER_FITZPATRIC_TYPE1_2 0x1F3FB +#define EMOJI_MODIFIER_FITZPATRIC_TYPE6 0x1F3FF integer kcatcodekey(integer c) { integer block; if (is_internalUPTEX()) { block = binary_search((long)c, ucs_range, 0, NUCS_RANGE-1); - if (block==0x01) { /* Block : Latin-1 Supplement */ + switch (block) { + case 0x01: /* Block : Latin-1 Supplement */ /* Latin-1 Letters */ if ( FEMININE_ORDINAL_INDICATOR ==c || MASCULINE_ORDINAL_INDICATOR==c @@ -471,17 +523,35 @@ integer kcatcodekey(integer c) || (LATIN_CAPITAL_LETTER_O_WITH_STROKE<=c && c<=LATIN_SMALL_LETTER_O_WITH_DIAERESIS ) || (LATIN_SMALL_LETTER_O_WITH_STROKE <=c && c<=LATIN_SMALL_LETTER_Y_WITH_DIAERESIS ) ) return 0x1FD; - } - if (block==0xa2) { /* Block : Halfwidth and Fullwidth Forms */ + break; + case 0xa2: /* Block : Halfwidth and Fullwidth Forms */ /* Fullwidth ASCII variants except for U+FF01..FF0F, U+FF1A..FF20, U+FF3B..FF40, U+FF5B..FF5E */ if ( (FULLWIDTH_DIGIT_0 <=c && c<=FULLWIDTH_DIGIT_9 ) || (FULLWIDTH_CAPITAL_A<=c && c<=FULLWIDTH_CAPITAL_Z) || (FULLWIDTH_SMALL_A <=c && c<=FULLWIDTH_SMALL_Z ) ) return 0x1FE; - /* Halfwidth Katakana variants except for U+FF65, U+FF70, U+FF9E..FF9F */ + /* Halfwidth Katakana variants except for U+FF65, U+FF70, U+FF9E..FF9F */ if ( (HALFWIDTH_KATAKANA_WO <=c && c<=HALFWIDTH_KATAKANA_SMALL_TSU ) || (HALFWIDTH_KATAKANA_A <=c && c<=HALFWIDTH_KATAKANA_N ) ) return 0x1FF; + break; + case 0x6c: /* Block : Hiragana */ + if ( COMBINING_KANA_VOICED_SOUND_MARK==c + || COMBINING_KANA_SEMI_VOICED_SOUND_MARK==c ) + return 0x1F9; + break; + case 0x4b: /* Block : Combining Diacritical Marks for Symbols */ + if ( COMBINING_ENCLOSING_KEYCAP==c ) + return 0x1FA; + break; + case 0x12e: /* Block : Enclosed Alphanumeric Supplement */ + if ( REGIONAL_INDICATOR_SYMBOL_LETTER_A <=c && c<= REGIONAL_INDICATOR_SYMBOL_LETTER_Z ) + return 0x1FB; + break; + case 0x130: /* Block : Miscellaneous Symbols and Pictographs */ + if ( EMOJI_MODIFIER_FITZPATRIC_TYPE1_2 <=c && c<= EMOJI_MODIFIER_FITZPATRIC_TYPE6 ) + return 0x1FC; + break; } return block; } else { diff --git a/Build/source/texk/web2c/uptexdir/kanji.h b/Build/source/texk/web2c/uptexdir/kanji.h index 6109288af74..419990a9990 100644 --- a/Build/source/texk/web2c/uptexdir/kanji.h +++ b/Build/source/texk/web2c/uptexdir/kanji.h @@ -35,6 +35,10 @@ extern boolean is_char_kanji (integer c); extern boolean ismultiprn (integer c); extern integer calc_pos (integer c); #define calcpos calc_pos +extern integer ktoken_to_cmd (integer c); +extern integer ktoken_to_chr (integer c); +#define ktokentocmd ktoken_to_cmd +#define ktokentochr ktoken_to_chr extern integer kcatcodekey (integer c); extern integer multilenbuffchar (integer c); @@ -67,6 +71,9 @@ extern void init_default_kanji_select (void); #define inputline2(fp,buff,pos,size) input_line2(fp,buff,NULL,pos,size,NULL) #endif #define ptencconvfirstline(pos,limit,buff,size) ptenc_conv_first_line(pos,limit,buff,size) +#define UVScombinecode(ucv,uvs) UVS_combine_code(ucv,uvs) +#define UVSgetcodepointlength(ucv) UVS_get_codepoint_length(ucv) +#define UVSgetcodepointinsequence(ucv,n) UVS_get_codepoint_in_sequence(ucv,n) extern void init_kanji (const_string file_str, const_string internal_str); extern void dump_kanji (gzFile fp); diff --git a/Build/source/texk/web2c/uptexdir/newjfm.test b/Build/source/texk/web2c/uptexdir/newjfm.test index 986bbdd0d61..04b4cdb8a68 100755 --- a/Build/source/texk/web2c/uptexdir/newjfm.test +++ b/Build/source/texk/web2c/uptexdir/newjfm.test @@ -1,5 +1,6 @@ #! /bin/sh -vx -# $Id: newjfm.test 46400 2018-01-21 05:26:27Z hironobu $ +# $Id$ +# Copyright 2024 Japanese TeX Development Community <issue@texjp.org> # Copyright 2018 Karl Berry <tex-live@tug.org> # You may freely use, modify and/or distribute this file. @@ -25,3 +26,17 @@ for font in testnewu; do done +for font in testnewu8; do + + $_uppltotf -verbose $testdir/$font.pl uptests/x$font.tfm && \ + cmp $testdir/$font.tfm uptests/x$font.tfm && echo || exit 3 + + TEXMFCNF=$srcdir/../kpathsea \ + $_uptftopl -verbose $testdir/$font.tfm uptests/x$font.pl && \ + diff $testdir/$font.pl uptests/x$font.pl && echo || exit 4 + +done + +cmp uptests/xtestnewu.tfm uptests/xtestnewu8.tfm || exit 10 + +exit 0 diff --git a/Build/source/texk/web2c/uptexdir/tests/kcat.tex b/Build/source/texk/web2c/uptexdir/tests/kcat.tex index fd841d4b829..6a3f930c2fa 100644 --- a/Build/source/texk/web2c/uptexdir/tests/kcat.tex +++ b/Build/source/texk/web2c/uptexdir/tests/kcat.tex @@ -48,6 +48,8 @@ \write16{丽::\the\kcatcode"2F800}% U+2F800 CJK Compatibility Ideographs Supplement \write16{𰀀::\the\kcatcode"30000}% U+30000 CJK Unified Ideographs Extension G \write16{𱍐::\the\kcatcode"31350}% U+31350 CJK Unified Ideographs Extension H +\write16{逸︀::\the\kcatcode"409038}% U+9038 U+FE00 Standardized Variation Sequence +\write16{逸󠄀::\the\kcatcode"809038}% U+9038 U+E0100 Ideographic Variation Sequence % kana=17 {hiragana, katakana} \write16{あ::\the\kcatcode"3042}% U+3042 Hiragana @@ -57,6 +59,8 @@ \write16{𛀀::\the\kcatcode"1B000}% U+1B000 Kana Supplement \write16{𛄀::\the\kcatcode"1B100}% U+1B100 Kana Extended-A \write16{𛅐::\the\kcatcode"1B150}% U+1B150 Small Kana Extension +\write16{あ゙::\the\kcatcode"223042}% U+3042 U+3099 Kana with Voiced Sound Mark +\write16{か゚::\the\kcatcode"24304B}% U+304B U+309A Kana with Semi-Voiced Sound Mark % other_kchar=18 {cjk symbol codes} \write16{※::\the\kcatcode"203B}% U+203B General Punctuation @@ -71,6 +75,9 @@ \write16{〠::\the\kcatcode"3020}% U+3020 CJK Symbols and Punctuation \write16{㋐::\the\kcatcode"32D0}% U+32D0 Enclosed CJK Letters and Months \write16{㍿::\the\kcatcode"337F}% U+337F CJK Compatibility +\write16{🇯🇵::\the\kcatcode"25EFF5}% U+1F1EF U+1F1F5 Emoji Flag Sequence +\write16{👶🏽::\the\kcatcode"2BF476}% U+1F476 U+1F3FD Emoji with Modifier Fitzpatrick +\write16{0x800030::\the\kcatcode"800030}% U+0030 U+FE0F U+20E3 Emoji Keycap Sequence % hangul=19 {hangul codes} \write16{ᄀ::\the\kcatcode"1100}% U+1100 Hangul Jamo @@ -79,4 +86,12 @@ \write16{가::\the\kcatcode"AC00}% U+AC00 Hangul Syllables \write16{ힰ::\the\kcatcode"D7B0}% U+D7B0 Hangul Jamo Extended-B +% modifier=20 {modifier codes} +\write16{゚\the\kcatcode"309A}% U+309A Combining Kana (Semi-)Voiced Sound Mark +\write16{⃣::\the\kcatcode"20E3}% U+20E3 Combining Enclosing Keycap +\write16{🇦::\the\kcatcode"1F1E6}% U+1F1E6 Regional Indicator Symbol Letter +\write16{🏻::\the\kcatcode"1F3FB}% U+1F3FB Emoji Modifier Fitzpatrick +\write16{︀::\the\kcatcode"FE00}% U+FE00 Variation Selector +\write16{󠄀::\the\kcatcode"E0100}% U+E0100 Variation Selector + \relax\end diff --git a/Build/source/texk/web2c/uptexdir/tests/testnewu.pl b/Build/source/texk/web2c/uptexdir/tests/testnewu.pl index 6b211cd51aa..8d07246bf55 100644 --- a/Build/source/texk/web2c/uptexdir/tests/testnewu.pl +++ b/Build/source/texk/web2c/uptexdir/tests/testnewu.pl @@ -52,10 +52,10 @@ (STOP) ) (CHARSINTYPE O 1 - U 81FC U FF08 U 26951 + U 81FC U FF08 U 26951 U 23B0A6 U 24304B U 25B0B1 ) (CHARSINTYPE O 2 - U 5409 U FF09 U 20BB7 + U 5409 U FF09 U 20BB7 U 25EFF5 ) (CHARSINTYPE O 3 U 2462 U FF1A @@ -64,7 +64,7 @@ U 2463 U 3002 ) (CHARSINTYPE O 5 - U 2026 U 2464 + U 2026 U 2464 U 26270B U 2FF476 ) (TYPE O 0 (CHARWD R 1.0) @@ -76,7 +76,7 @@ ) ) (TYPE O 1 - (CHARWD R 0.5) + (CHARWD R 1.01) (CHARHT R 0.88) (CHARDP R 0.12) (COMMENT @@ -84,7 +84,7 @@ ) ) (TYPE O 2 - (CHARWD R 0.5) + (CHARWD R 1.02) (CHARHT R 0.88) (CHARDP R 0.12) (COMMENT @@ -119,7 +119,7 @@ ) ) (TYPE O 5 - (CHARWD R 1.0) + (CHARWD R 1.05) (CHARHT R 0.88) (CHARDP R 0.12) (COMMENT diff --git a/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm b/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm Binary files differindex 6860278f2ca..5492e2c3c1b 100644 --- a/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm +++ b/Build/source/texk/web2c/uptexdir/tests/testnewu.tfm diff --git a/Build/source/texk/web2c/uptexdir/tests/testnewu8.pl b/Build/source/texk/web2c/uptexdir/tests/testnewu8.pl new file mode 100644 index 00000000000..cca18cfafec --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/testnewu8.pl @@ -0,0 +1,130 @@ +(COMMENT THIS IS A KANJI FORMAT FILE) +(FAMILY UPJIS KANJI) +(FACE F MRR) +(CODINGSCHEME TEX KANJI TEXT) +(DESIGNSIZE R 10.0) +(COMMENT DESIGNSIZE IS IN POINTS) +(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE) +(CHECKSUM O 0) +(FONTDIMEN + (SLANT R 0.0) + (SPACE R 0.0) + (STRETCH R 0.1) + (SHRINK R 0.0) + (XHEIGHT R 1.0) + (QUAD R 1.0) + (EXTRASPACE R 0.25) + (EXTRASTRETCH R 0.2) + (EXTRASHRINK R 0.125) + ) +(GLUEKERN + (LABEL O 0) + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (STOP) + (LABEL O 1) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (STOP) + (LABEL O 2) + (GLUE O 0 R 0.5 R 0.0 R 0.5) + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (GLUE O 5 R 0.5 R 0.0 R 0.5) + (STOP) + (LABEL O 3) + (GLUE O 0 R 0.25 R 0.0 R 0.25) + (GLUE O 1 R 0.25 R 0.0 R 0.25) + (GLUE O 2 R 0.25 R 0.0 R 0.25) + (GLUE O 3 R 0.5 R 0.0 R 0.25) + (GLUE O 4 R 0.25 R 0.0 R 0.25) + (GLUE O 5 R 0.25 R 0.0 R 0.25) + (STOP) + (LABEL O 4) + (GLUE O 0 R 0.5 R 0.0 R 0.0) + (GLUE O 1 R 0.5 R 0.0 R 0.0) + (GLUE O 3 R 0.75 R 0.0 R 0.25) + (GLUE O 5 R 0.5 R 0.0 R 0.0) + (STOP) + (LABEL O 5) + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (KRN O 5 R 0.0) + (STOP) + ) +(CHARSINTYPE O 1 + 臼 ( 𦥑 𛂦゙ か゚ 𛂱゚ + ) +(CHARSINTYPE O 2 + 吉 ) 𠮷 🇯🇵 + ) +(CHARSINTYPE O 3 + ③ : + ) +(CHARSINTYPE O 4 + ④ 。 + ) +(CHARSINTYPE O 5 + … ⑤ ✋🏻 👶🏿 + ) +(TYPE O 0 + (CHARWD R 1.0) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + ) + ) +(TYPE O 1 + (CHARWD R 1.01) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 3 R 0.25 R 0.0 R 0.25) + ) + ) +(TYPE O 2 + (CHARWD R 1.02) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 0 R 0.5 R 0.0 R 0.5) + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (GLUE O 5 R 0.5 R 0.0 R 0.5) + ) + ) +(TYPE O 3 + (CHARWD R 0.5) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 0 R 0.25 R 0.0 R 0.25) + (GLUE O 1 R 0.25 R 0.0 R 0.25) + (GLUE O 2 R 0.25 R 0.0 R 0.25) + (GLUE O 3 R 0.5 R 0.0 R 0.25) + (GLUE O 4 R 0.25 R 0.0 R 0.25) + (GLUE O 5 R 0.25 R 0.0 R 0.25) + ) + ) +(TYPE O 4 + (CHARWD R 0.5) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 0 R 0.5 R 0.0 R 0.0) + (GLUE O 1 R 0.5 R 0.0 R 0.0) + (GLUE O 3 R 0.75 R 0.0 R 0.25) + (GLUE O 5 R 0.5 R 0.0 R 0.0) + ) + ) +(TYPE O 5 + (CHARWD R 1.05) + (CHARHT R 0.88) + (CHARDP R 0.12) + (COMMENT + (GLUE O 1 R 0.5 R 0.0 R 0.5) + (GLUE O 3 R 0.25 R 0.0 R 0.25) + (KRN O 5 R 0.0) + ) + ) diff --git a/Build/source/texk/web2c/uptexdir/tests/testnewu8.tfm b/Build/source/texk/web2c/uptexdir/tests/testnewu8.tfm Binary files differnew file mode 100644 index 00000000000..5492e2c3c1b --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/testnewu8.tfm diff --git a/Build/source/texk/web2c/uptexdir/tests/upkcat.txt b/Build/source/texk/web2c/uptexdir/tests/upkcat.txt index a3b509a2275..d4da0a6dfb4 100644 --- a/Build/source/texk/web2c/uptexdir/tests/upkcat.txt +++ b/Build/source/texk/web2c/uptexdir/tests/upkcat.txt @@ -25,6 +25,8 @@ A::15 丽::16 𰀀::16 𱍐::16 +逸︀::16 +逸󠄀::16 あ::17 ア::17 ㇰ::17 @@ -32,6 +34,8 @@ A::15 𛀀::17 𛄀::17 𛅐::17 +あ゙::17 +か゚::17 ※::18 ℃::18 Ⅻ::18 @@ -44,8 +48,16 @@ A::15 〠::18 ㋐::18 ㍿::18 +🇯🇵::18 +👶🏽::18 +0x800030::18 ᄀ::19 ㄱ::19 ꥠ::19 가::19 ힰ::19 +⃣::20 +🇦::20 +🏻::20 +︀::20 +󠄀::20 diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex5.dvi b/Build/source/texk/web2c/uptexdir/tests/uptex5.dvi Binary files differnew file mode 100644 index 00000000000..074c78dd37a --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex5.dvi diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex5.tex b/Build/source/texk/web2c/uptexdir/tests/uptex5.tex new file mode 100644 index 00000000000..f67ce563719 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex5.tex @@ -0,0 +1,42 @@ +%#!uptex + +\parindent=0pt +\font\jpy=umin10 +\jpy +% IVS, SVS +逸・逸︀・逸︁・逸󠄀・逸󠄁・逸󠄂\par +\kchar"9038・\kchar"9038\kchar"FE00・\kchar"449038・\kchar"9038\kchar"E0100・\kchar"849038・\kchar"9038\kchar"E0102\par + +𤋮・𤋮︀・𤋮󠄀・𤋮󠄁\par +\kchar"242EE・\kchar"242EE\kchar"FE00・\kchar"242EE\kchar"E0100・\kchar"8642EE\par + +% Kana Voiced Sound +か・が・か゚・か゚・あ゙・𛂦゙\par +\kchar"304B・\kchar"304C・\kchar"304B\kchar"309A・\kchar"24304B・\kchar"223042・\kchar"23B0A6\par + +% Emoji Modifier Fitzpatrick +✋・✋🏻・✋🏼・✋🏽・✋🏾・✋🏿\par +\kchar"270B・\kchar"270B\kchar"1F3FB・\kchar"28270B・\kchar"270B\kchar"1F3FD・\kchar"2C270B・\kchar"270B\kchar"1F3FF\par + +👶・👶🏻・👶🏼・👶🏽・👶🏾・👶🏿\par +\kchar"1F476・\kchar"1F476\kchar"1F3FB・\kchar"29F476・\kchar"1F476\kchar"1F3FD・\kchar"2DF476・\kchar"1F476\kchar"1F3FF\par + +% Emoji Flag Sequence +🇺🇳・🇪🇺・🇦🇨・🇯🇵・🇿🇼・🇦🇦・🇿🇿\par +\kchar"1F1FA\kchar"1F1F3・\kchar"1F1EA\kchar"1F1FA・\kchar"1F1E6\kchar"1F1E8・\kchar"1F1EF\kchar"1F1F5・\kchar"1F1FF\kchar"1F1FC・\kchar"1F1E6\kchar"1F1E6・\kchar"1F1FF\kchar"1F1FF\par + +% Base for Emoji Keycap Sequence +\kchar"23\kchar"FE0F・\kchar"2A\kchar"FE0F・\kchar"30\kchar"FE0F・\kchar"31\kchar"FE0F・\kchar"32\kchar"FE0F・\kchar"38\kchar"FE0F・\kchar"39\kchar"FE0F\par +\kchar"7C0023・\kchar"7C002A・\kchar"7C0030・\kchar"7C0031・\kchar"7C0032・\kchar"7C0038・\kchar"7C0039\par + +% Emoji Keycap Sequence +\kchar"23\kchar"FE0F\kchar"20E3・\kchar"2A\kchar"FE0F\kchar"20E3・\kchar"30\kchar"FE0F\kchar"20E3・\kchar"31\kchar"FE0F\kchar"20E3・\kchar"32\kchar"FE0F\kchar"20E3・\kchar"38\kchar"FE0F\kchar"20E3・\kchar"39\kchar"FE0F\kchar"20E3\par +\kchar"7C0023\kchar"20E3・\kchar"80002A・\kchar"7C0030\kchar"20E3・\kchar"800031・\kchar"7C0032\kchar"20E3・\kchar"800038・\kchar"800039\par + +% IVS, over VS48 +一󠄟・二󠄠・三󠄡・四󠅠・五󠇐・六󠇟・七󠇯\par +\kchar"4E00\kchar"E011F・\kchar"4E8C\kchar"E0120・\kchar"4E09\kchar"E0121・\kchar"56DB\kchar"E0160 +・\kchar"4E94\kchar"E01D0・\kchar"516D\kchar"E01DF・\kchar"4E03\kchar"E01EF\par +\kchar"FC4E00・\kchar"1004E8C・\kchar"1044E09・\kchar"20056DB +・\kchar"3C04E94・\kchar"3FC516D・\kchar"43C4E03\par +\bye diff --git a/Build/source/texk/web2c/uptexdir/tests/uptex5a.typ b/Build/source/texk/web2c/uptexdir/tests/uptex5a.typ new file mode 100644 index 00000000000..9568cc94dc4 --- /dev/null +++ b/Build/source/texk/web2c/uptexdir/tests/uptex5a.typ @@ -0,0 +1,581 @@ +Options selected: + Starting page = * + Maximum number of pages = 1000000 + Output level = 4 (the works) + Resolution = 300.00000000 pixels per inch +numerator/denominator=25400000/473628672 +magnification=1000; 0.00006334 pixels per DVI unit +' TeX output 2024.04.27:1506' +Postamble starts at byte 1272. +maxv=43725786, maxh=30785863, maxstackdepth=2, totalpages=1 +Font 62: umin10 (JFM)---loaded at size 655360 DVI units +Font 0: cmr10---loaded at size 655360 DVI units + +42: beginning of page 1 +87: push +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +88: down3 -917504 v:=0-917504=-917504, vv:=-58 +92: pop +level 0:(h=0,v=0,w=0,x=0,y=0,z=0,hh=0,vv=0) +93: down4 42152922 v:=0+42152922=42152922, vv:=2670 +98: push +level 0:(h=0,v=42152922,w=0,x=0,y=0,z=0,hh=0,vv=2670) +99: down4 -41497562 v:=42152922-41497562=655360, vv:=42 +104: push +level 1:(h=0,v=655360,w=0,x=0,y=0,z=0,hh=0,vv=42) +105: fntdef1 62: umin10 +127: fntnum62 current font is umin10 +128: set2 36920("9038) type=0 h:=0+630598=630598, hh:=40 +131: w3 199410 h:=630598+199410=830008, hh:=53 +135: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +138: w0 199410 h:=1061786+199410=1261196, hh:=80 +139: set3 4231224("409038) type=0 h:=1261196+630598=1891794, hh:=120 +143: w0 199410 h:=1891794+199410=2091204, hh:=132 +144: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +147: w0 199410 h:=2322982+199410=2522392, hh:=160 +148: set3 4493368("449038) type=0 h:=2522392+630598=3152990, hh:=200 +152: w0 199410 h:=3152990+199410=3352400, hh:=212 +153: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +156: w0 199410 h:=3584178+199410=3783588, hh:=240 +157: set3 8425528("809038) type=0 h:=3783588+630598=4414186, hh:=280 +161: w0 199410 h:=4414186+199410=4613596, hh:=292 +162: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +165: w0 199410 h:=4845374+199410=5044784, hh:=320 +166: set3 8687672("849038) type=0 h:=5044784+630598=5675382, hh:=360 +170: w0 199410 h:=5675382+199410=5874792, hh:=372 +171: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +174: w0 199410 h:=6106570+199410=6305980, hh:=399 +175: set3 8949816("889038) type=0 h:=6305980+630598=6936578, hh:=439 +[逸 ・ 逸︀ ・ 逸︁ ・ 逸󠄀 ・ 逸󠄁 ・ 逸󠄂] +179: pop +level 1:(h=0,v=655360,w=0,x=0,y=0,z=0,hh=0,vv=42) +180: y3 786432 v:=655360+786432=1441792, vv:=91 +184: push +level 1:(h=0,v=1441792,w=0,x=0,y=786432,z=0,hh=0,vv=91) +185: set2 36920("9038) type=0 h:=0+630598=630598, hh:=40 +188: w3 199410 h:=630598+199410=830008, hh:=53 +192: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +195: w0 199410 h:=1061786+199410=1261196, hh:=80 +196: set3 4231224("409038) type=0 h:=1261196+630598=1891794, hh:=120 +200: w0 199410 h:=1891794+199410=2091204, hh:=132 +201: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +204: w0 199410 h:=2322982+199410=2522392, hh:=160 +205: set3 4493368("449038) type=0 h:=2522392+630598=3152990, hh:=200 +209: w0 199410 h:=3152990+199410=3352400, hh:=212 +210: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +213: w0 199410 h:=3584178+199410=3783588, hh:=240 +214: set3 8425528("809038) type=0 h:=3783588+630598=4414186, hh:=280 +218: w0 199410 h:=4414186+199410=4613596, hh:=292 +219: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +222: w0 199410 h:=4845374+199410=5044784, hh:=320 +223: set3 8687672("849038) type=0 h:=5044784+630598=5675382, hh:=360 +227: w0 199410 h:=5675382+199410=5874792, hh:=372 +228: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +231: w0 199410 h:=6106570+199410=6305980, hh:=399 +232: set3 8949816("889038) type=0 h:=6305980+630598=6936578, hh:=439 +[逸 ・ 逸︀ ・ 逸︁ ・ 逸󠄀 ・ 逸󠄁 ・ 逸󠄂] +236: pop +level 1:(h=0,v=1441792,w=0,x=0,y=786432,z=0,hh=0,vv=91) +237: y0 786432 v:=1441792+786432=2228224, vv:=141 +238: push +level 1:(h=0,v=2228224,w=0,x=0,y=786432,z=0,hh=0,vv=141) +239: set3 148206("242EE) type=0 h:=0+630598=630598, hh:=40 +243: w3 199410 h:=630598+199410=830008, hh:=53 +247: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +250: w0 199410 h:=1061786+199410=1261196, hh:=80 +251: set3 4342510("4242EE) type=0 h:=1261196+630598=1891794, hh:=120 +255: w0 199410 h:=1891794+199410=2091204, hh:=132 +256: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +259: w0 199410 h:=2322982+199410=2522392, hh:=160 +260: set3 8536814("8242EE) type=0 h:=2522392+630598=3152990, hh:=200 +264: w0 199410 h:=3152990+199410=3352400, hh:=212 +265: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +268: w0 199410 h:=3584178+199410=3783588, hh:=240 +269: set3 8798958("8642EE) type=0 h:=3783588+630598=4414186, hh:=280 +[𤋮 ・ 𤋮︀ ・ 𤋮󠄀 ・ 𤋮󠄁] +273: pop +level 1:(h=0,v=2228224,w=0,x=0,y=786432,z=0,hh=0,vv=141) +274: y0 786432 v:=2228224+786432=3014656, vv:=191 +275: push +level 1:(h=0,v=3014656,w=0,x=0,y=786432,z=0,hh=0,vv=191) +276: set3 148206("242EE) type=0 h:=0+630598=630598, hh:=40 +280: w3 199410 h:=630598+199410=830008, hh:=53 +284: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +287: w0 199410 h:=1061786+199410=1261196, hh:=80 +288: set3 4342510("4242EE) type=0 h:=1261196+630598=1891794, hh:=120 +292: w0 199410 h:=1891794+199410=2091204, hh:=132 +293: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +296: w0 199410 h:=2322982+199410=2522392, hh:=160 +297: set3 8536814("8242EE) type=0 h:=2522392+630598=3152990, hh:=200 +301: w0 199410 h:=3152990+199410=3352400, hh:=212 +302: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +305: w0 199410 h:=3584178+199410=3783588, hh:=240 +306: set3 8798958("8642EE) type=0 h:=3783588+630598=4414186, hh:=280 +[𤋮 ・ 𤋮︀ ・ 𤋮󠄀 ・ 𤋮󠄁] +310: pop +level 1:(h=0,v=3014656,w=0,x=0,y=786432,z=0,hh=0,vv=191) +311: y0 786432 v:=3014656+786432=3801088, vv:=241 +312: push +level 1:(h=0,v=3801088,w=0,x=0,y=786432,z=0,hh=0,vv=241) +313: set2 12363("304B) type=0 h:=0+630598=630598, hh:=40 +316: w3 199410 h:=630598+199410=830008, hh:=53 +320: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +323: w0 199410 h:=1061786+199410=1261196, hh:=80 +324: set2 12364("304C) type=0 h:=1261196+630598=1891794, hh:=120 +327: w0 199410 h:=1891794+199410=2091204, hh:=132 +328: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +331: w0 199410 h:=2322982+199410=2522392, hh:=160 +332: set3 2371659("24304B) type=0 h:=2522392+630598=3152990, hh:=200 +336: w0 199410 h:=3152990+199410=3352400, hh:=212 +337: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +340: w0 199410 h:=3584178+199410=3783588, hh:=240 +341: set3 2371659("24304B) type=0 h:=3783588+630598=4414186, hh:=280 +345: w0 199410 h:=4414186+199410=4613596, hh:=292 +346: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +349: w0 199410 h:=4845374+199410=5044784, hh:=320 +350: set3 2240578("223042) type=0 h:=5044784+630598=5675382, hh:=360 +354: w0 199410 h:=5675382+199410=5874792, hh:=372 +355: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +358: w0 199410 h:=6106570+199410=6305980, hh:=399 +359: set3 2338982("23B0A6) type=0 h:=6305980+630598=6936578, hh:=439 +[か ・ が ・ か゚ ・ か゚ ・ あ゙ ・ 𛂦゙] +363: pop +level 1:(h=0,v=3801088,w=0,x=0,y=786432,z=0,hh=0,vv=241) +364: y0 786432 v:=3801088+786432=4587520, vv:=291 +365: push +level 1:(h=0,v=4587520,w=0,x=0,y=786432,z=0,hh=0,vv=291) +366: set2 12363("304B) type=0 h:=0+630598=630598, hh:=40 +369: w3 199410 h:=630598+199410=830008, hh:=53 +373: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +376: w0 199410 h:=1061786+199410=1261196, hh:=80 +377: set2 12364("304C) type=0 h:=1261196+630598=1891794, hh:=120 +380: w0 199410 h:=1891794+199410=2091204, hh:=132 +381: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +384: w0 199410 h:=2322982+199410=2522392, hh:=160 +385: set3 2371659("24304B) type=0 h:=2522392+630598=3152990, hh:=200 +389: w0 199410 h:=3152990+199410=3352400, hh:=212 +390: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +393: w0 199410 h:=3584178+199410=3783588, hh:=240 +394: set3 2371659("24304B) type=0 h:=3783588+630598=4414186, hh:=280 +398: w0 199410 h:=4414186+199410=4613596, hh:=292 +399: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +402: w0 199410 h:=4845374+199410=5044784, hh:=320 +403: set3 2240578("223042) type=0 h:=5044784+630598=5675382, hh:=360 +407: w0 199410 h:=5675382+199410=5874792, hh:=372 +408: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +411: w0 199410 h:=6106570+199410=6305980, hh:=399 +412: set3 2338982("23B0A6) type=0 h:=6305980+630598=6936578, hh:=439 +[か ・ が ・ か゚ ・ か゚ ・ あ゙ ・ 𛂦゙] +416: pop +level 1:(h=0,v=4587520,w=0,x=0,y=786432,z=0,hh=0,vv=291) +417: y0 786432 v:=4587520+786432=5373952, vv:=340 +418: push +level 1:(h=0,v=5373952,w=0,x=0,y=786432,z=0,hh=0,vv=340) +419: set2 9995("270B) type=0 h:=0+630598=630598, hh:=40 +422: w3 199410 h:=630598+199410=830008, hh:=53 +426: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +429: w0 199410 h:=1061786+199410=1261196, hh:=80 +430: set3 2500363("26270B) type=0 h:=1261196+630598=1891794, hh:=120 +434: w0 199410 h:=1891794+199410=2091204, hh:=132 +435: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +438: w0 199410 h:=2322982+199410=2522392, hh:=160 +439: set3 2631435("28270B) type=0 h:=2522392+630598=3152990, hh:=200 +443: w0 199410 h:=3152990+199410=3352400, hh:=212 +444: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +447: w0 199410 h:=3584178+199410=3783588, hh:=240 +448: set3 2762507("2A270B) type=0 h:=3783588+630598=4414186, hh:=280 +452: w0 199410 h:=4414186+199410=4613596, hh:=292 +453: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +456: w0 199410 h:=4845374+199410=5044784, hh:=320 +457: set3 2893579("2C270B) type=0 h:=5044784+630598=5675382, hh:=360 +461: w0 199410 h:=5675382+199410=5874792, hh:=372 +462: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +465: w0 199410 h:=6106570+199410=6305980, hh:=399 +466: set3 3024651("2E270B) type=0 h:=6305980+630598=6936578, hh:=439 +[✋ ・ ✋🏻 ・ ✋🏼 ・ ✋🏽 ・ ✋🏾 ・ ✋🏿] +470: pop +level 1:(h=0,v=5373952,w=0,x=0,y=786432,z=0,hh=0,vv=340) +471: y0 786432 v:=5373952+786432=6160384, vv:=390 +472: push +level 1:(h=0,v=6160384,w=0,x=0,y=786432,z=0,hh=0,vv=390) +473: set2 9995("270B) type=0 h:=0+630598=630598, hh:=40 +476: w3 199410 h:=630598+199410=830008, hh:=53 +480: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +483: w0 199410 h:=1061786+199410=1261196, hh:=80 +484: set3 2500363("26270B) type=0 h:=1261196+630598=1891794, hh:=120 +488: w0 199410 h:=1891794+199410=2091204, hh:=132 +489: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +492: w0 199410 h:=2322982+199410=2522392, hh:=160 +493: set3 2631435("28270B) type=0 h:=2522392+630598=3152990, hh:=200 +497: w0 199410 h:=3152990+199410=3352400, hh:=212 +498: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +501: w0 199410 h:=3584178+199410=3783588, hh:=240 +502: set3 2762507("2A270B) type=0 h:=3783588+630598=4414186, hh:=280 +506: w0 199410 h:=4414186+199410=4613596, hh:=292 +507: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +510: w0 199410 h:=4845374+199410=5044784, hh:=320 +511: set3 2893579("2C270B) type=0 h:=5044784+630598=5675382, hh:=360 +515: w0 199410 h:=5675382+199410=5874792, hh:=372 +516: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +519: w0 199410 h:=6106570+199410=6305980, hh:=399 +520: set3 3024651("2E270B) type=0 h:=6305980+630598=6936578, hh:=439 +[✋ ・ ✋🏻 ・ ✋🏼 ・ ✋🏽 ・ ✋🏾 ・ ✋🏿] +524: pop +level 1:(h=0,v=6160384,w=0,x=0,y=786432,z=0,hh=0,vv=390) +525: y0 786432 v:=6160384+786432=6946816, vv:=440 +526: push +level 1:(h=0,v=6946816,w=0,x=0,y=786432,z=0,hh=0,vv=440) +527: set3 128118("1F476) type=0 h:=0+630598=630598, hh:=40 +531: w3 199410 h:=630598+199410=830008, hh:=53 +535: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +538: w0 199410 h:=1061786+199410=1261196, hh:=80 +539: set3 2618486("27F476) type=0 h:=1261196+630598=1891794, hh:=120 +543: w0 199410 h:=1891794+199410=2091204, hh:=132 +544: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +547: w0 199410 h:=2322982+199410=2522392, hh:=160 +548: set3 2749558("29F476) type=0 h:=2522392+630598=3152990, hh:=200 +552: w0 199410 h:=3152990+199410=3352400, hh:=212 +553: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +556: w0 199410 h:=3584178+199410=3783588, hh:=240 +557: set3 2880630("2BF476) type=0 h:=3783588+630598=4414186, hh:=280 +561: w0 199410 h:=4414186+199410=4613596, hh:=292 +562: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +565: w0 199410 h:=4845374+199410=5044784, hh:=320 +566: set3 3011702("2DF476) type=0 h:=5044784+630598=5675382, hh:=360 +570: w0 199410 h:=5675382+199410=5874792, hh:=372 +571: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +574: w0 199410 h:=6106570+199410=6305980, hh:=399 +575: set3 3142774("2FF476) type=0 h:=6305980+630598=6936578, hh:=439 +[👶 ・ 👶🏻 ・ 👶🏼 ・ 👶🏽 ・ 👶🏾 ・ 👶🏿] +579: pop +level 1:(h=0,v=6946816,w=0,x=0,y=786432,z=0,hh=0,vv=440) +580: y0 786432 v:=6946816+786432=7733248, vv:=490 +581: push +level 1:(h=0,v=7733248,w=0,x=0,y=786432,z=0,hh=0,vv=490) +582: set3 128118("1F476) type=0 h:=0+630598=630598, hh:=40 +586: w3 199410 h:=630598+199410=830008, hh:=53 +590: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +593: w0 199410 h:=1061786+199410=1261196, hh:=80 +594: set3 2618486("27F476) type=0 h:=1261196+630598=1891794, hh:=120 +598: w0 199410 h:=1891794+199410=2091204, hh:=132 +599: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +602: w0 199410 h:=2322982+199410=2522392, hh:=160 +603: set3 2749558("29F476) type=0 h:=2522392+630598=3152990, hh:=200 +607: w0 199410 h:=3152990+199410=3352400, hh:=212 +608: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +611: w0 199410 h:=3584178+199410=3783588, hh:=240 +612: set3 2880630("2BF476) type=0 h:=3783588+630598=4414186, hh:=280 +616: w0 199410 h:=4414186+199410=4613596, hh:=292 +617: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +620: w0 199410 h:=4845374+199410=5044784, hh:=320 +621: set3 3011702("2DF476) type=0 h:=5044784+630598=5675382, hh:=360 +625: w0 199410 h:=5675382+199410=5874792, hh:=372 +626: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +629: w0 199410 h:=6106570+199410=6305980, hh:=399 +630: set3 3142774("2FF476) type=0 h:=6305980+630598=6936578, hh:=439 +[👶 ・ 👶🏻 ・ 👶🏼 ・ 👶🏽 ・ 👶🏾 ・ 👶🏿] +634: pop +level 1:(h=0,v=7733248,w=0,x=0,y=786432,z=0,hh=0,vv=490) +635: y0 786432 v:=7733248+786432=8519680, vv:=540 +636: push +level 1:(h=0,v=8519680,w=0,x=0,y=786432,z=0,hh=0,vv=540) +637: set3 2489075("25FAF3) type=0 h:=0+630598=630598, hh:=40 +641: w3 199410 h:=630598+199410=830008, hh:=53 +645: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +648: w0 199410 h:=1061786+199410=1261196, hh:=80 +649: set3 2484986("25EAFA) type=0 h:=1261196+630598=1891794, hh:=120 +653: w0 199410 h:=1891794+199410=2091204, hh:=132 +654: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +657: w0 199410 h:=2322982+199410=2522392, hh:=160 +658: set3 2483944("25E6E8) type=0 h:=2522392+630598=3152990, hh:=200 +662: w0 199410 h:=3152990+199410=3352400, hh:=212 +663: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +666: w0 199410 h:=3584178+199410=3783588, hh:=240 +667: set3 2486261("25EFF5) type=0 h:=3783588+630598=4414186, hh:=280 +671: w0 199410 h:=4414186+199410=4613596, hh:=292 +672: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +675: w0 199410 h:=4845374+199410=5044784, hh:=320 +676: set3 2490364("25FFFC) type=0 h:=5044784+630598=5675382, hh:=360 +680: w0 199410 h:=5675382+199410=5874792, hh:=372 +681: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +684: w0 199410 h:=6106570+199410=6305980, hh:=399 +685: set3 2483942("25E6E6) type=0 h:=6305980+630598=6936578, hh:=439 +689: w0 199410 h:=6936578+199410=7135988, hh:=452 +[🇺🇳 ・ 🇪🇺 ・ 🇦🇨 ・ 🇯🇵 ・ 🇿🇼 ・ 🇦🇦 ] +690: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +693: w0 199410 h:=7367766+199410=7567176, hh:=479 +694: set3 2490367("25FFFF) type=0 h:=7567176+630598=8197774, hh:=519 +[・ 🇿🇿] +698: pop +level 1:(h=0,v=8519680,w=0,x=0,y=786432,z=0,hh=0,vv=540) +699: y0 786432 v:=8519680+786432=9306112, vv:=589 +700: push +level 1:(h=0,v=9306112,w=0,x=0,y=786432,z=0,hh=0,vv=589) +701: set3 2489075("25FAF3) type=0 h:=0+630598=630598, hh:=40 +705: w3 199410 h:=630598+199410=830008, hh:=53 +709: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +712: w0 199410 h:=1061786+199410=1261196, hh:=80 +713: set3 2484986("25EAFA) type=0 h:=1261196+630598=1891794, hh:=120 +717: w0 199410 h:=1891794+199410=2091204, hh:=132 +718: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +721: w0 199410 h:=2322982+199410=2522392, hh:=160 +722: set3 2483944("25E6E8) type=0 h:=2522392+630598=3152990, hh:=200 +726: w0 199410 h:=3152990+199410=3352400, hh:=212 +727: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +730: w0 199410 h:=3584178+199410=3783588, hh:=240 +731: set3 2486261("25EFF5) type=0 h:=3783588+630598=4414186, hh:=280 +735: w0 199410 h:=4414186+199410=4613596, hh:=292 +736: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +739: w0 199410 h:=4845374+199410=5044784, hh:=320 +740: set3 2490364("25FFFC) type=0 h:=5044784+630598=5675382, hh:=360 +744: w0 199410 h:=5675382+199410=5874792, hh:=372 +745: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +748: w0 199410 h:=6106570+199410=6305980, hh:=399 +749: set3 2483942("25E6E6) type=0 h:=6305980+630598=6936578, hh:=439 +753: w0 199410 h:=6936578+199410=7135988, hh:=452 +[🇺🇳 ・ 🇪🇺 ・ 🇦🇨 ・ 🇯🇵 ・ 🇿🇼 ・ 🇦🇦 ] +754: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +757: w0 199410 h:=7367766+199410=7567176, hh:=479 +758: set3 2490367("25FFFF) type=0 h:=7567176+630598=8197774, hh:=519 +[・ 🇿🇿] +762: pop +level 1:(h=0,v=9306112,w=0,x=0,y=786432,z=0,hh=0,vv=589) +763: y0 786432 v:=9306112+786432=10092544, vv:=639 +764: push +level 1:(h=0,v=10092544,w=0,x=0,y=786432,z=0,hh=0,vv=639) +765: set3 8126499("7C0023) type=0 h:=0+630598=630598, hh:=40 +769: w3 199410 h:=630598+199410=830008, hh:=53 +773: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +776: w0 199410 h:=1061786+199410=1261196, hh:=80 +777: set2 42("2A) type=0 h:=1261196+630598=1891794, hh:=120 +780: set2 65039("FE0F) type=0 h:=1891794+630598=2522392, hh:=160 +783: w0 199410 h:=2522392+199410=2721802, hh:=172 +784: set2 12539("30FB) type=4 h:=2721802+231778=2953580, hh:=187 +787: w0 199410 h:=2953580+199410=3152990, hh:=200 +788: set3 8126512("7C0030) type=0 h:=3152990+630598=3783588, hh:=240 +792: w0 199410 h:=3783588+199410=3982998, hh:=252 +793: set2 12539("30FB) type=4 h:=3982998+231778=4214776, hh:=267 +796: w0 199410 h:=4214776+199410=4414186, hh:=280 +797: set3 8126513("7C0031) type=0 h:=4414186+630598=5044784, hh:=320 +801: w0 199410 h:=5044784+199410=5244194, hh:=332 +802: set2 12539("30FB) type=4 h:=5244194+231778=5475972, hh:=347 +805: w0 199410 h:=5475972+199410=5675382, hh:=359 +806: set3 8126514("7C0032) type=0 h:=5675382+630598=6305980, hh:=399 +810: w0 199410 h:=6305980+199410=6505390, hh:=412 +811: set2 12539("30FB) type=4 h:=6505390+231778=6737168, hh:=427 +814: w0 199410 h:=6737168+199410=6936578, hh:=439 +815: set3 8126520("7C0038) type=0 h:=6936578+630598=7567176, hh:=479 +819: w0 199410 h:=7567176+199410=7766586, hh:=492 +820: set2 12539("30FB) type=4 h:=7766586+231778=7998364, hh:=507 +823: w0 199410 h:=7998364+199410=8197774, hh:=519 +824: set3 8126521("7C0039) type=0 h:=8197774+630598=8828372, hh:=559 +[#️ ・ *️ ・ 0️ ・ 1️ ・ 2️ ・ 8️ ・ 9️] +828: pop +level 1:(h=0,v=10092544,w=0,x=0,y=786432,z=0,hh=0,vv=639) +829: y0 786432 v:=10092544+786432=10878976, vv:=689 +830: push +level 1:(h=0,v=10878976,w=0,x=0,y=786432,z=0,hh=0,vv=689) +831: set3 8126499("7C0023) type=0 h:=0+630598=630598, hh:=40 +835: w3 199410 h:=630598+199410=830008, hh:=53 +839: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +842: w0 199410 h:=1061786+199410=1261196, hh:=80 +843: set3 8126506("7C002A) type=0 h:=1261196+630598=1891794, hh:=120 +847: w0 199410 h:=1891794+199410=2091204, hh:=132 +848: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +851: w0 199410 h:=2322982+199410=2522392, hh:=160 +852: set3 8126512("7C0030) type=0 h:=2522392+630598=3152990, hh:=200 +856: w0 199410 h:=3152990+199410=3352400, hh:=212 +857: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +860: w0 199410 h:=3584178+199410=3783588, hh:=240 +861: set3 8126513("7C0031) type=0 h:=3783588+630598=4414186, hh:=280 +865: w0 199410 h:=4414186+199410=4613596, hh:=292 +866: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +869: w0 199410 h:=4845374+199410=5044784, hh:=320 +870: set3 8126514("7C0032) type=0 h:=5044784+630598=5675382, hh:=360 +874: w0 199410 h:=5675382+199410=5874792, hh:=372 +875: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +878: w0 199410 h:=6106570+199410=6305980, hh:=399 +879: set3 8126520("7C0038) type=0 h:=6305980+630598=6936578, hh:=439 +883: w0 199410 h:=6936578+199410=7135988, hh:=452 +884: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +887: w0 199410 h:=7367766+199410=7567176, hh:=479 +888: set3 8126521("7C0039) type=0 h:=7567176+630598=8197774, hh:=519 +[#️ ・ *️ ・ 0️ ・ 1️ ・ 2️ ・ 8️ ・ 9️] +892: pop +level 1:(h=0,v=10878976,w=0,x=0,y=786432,z=0,hh=0,vv=689) +893: y0 786432 v:=10878976+786432=11665408, vv:=739 +894: push +level 1:(h=0,v=11665408,w=0,x=0,y=786432,z=0,hh=0,vv=739) +895: set3 8388643("800023) type=0 h:=0+630598=630598, hh:=40 +899: w3 199410 h:=630598+199410=830008, hh:=53 +903: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +906: w0 199410 h:=1061786+199410=1261196, hh:=80 +907: set2 42("2A) type=0 h:=1261196+630598=1891794, hh:=120 +910: set2 65039("FE0F) type=0 h:=1891794+630598=2522392, hh:=160 +913: set2 8419("20E3) type=0 h:=2522392+630598=3152990, hh:=200 +916: w0 199410 h:=3152990+199410=3352400, hh:=212 +917: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +920: w0 199410 h:=3584178+199410=3783588, hh:=240 +921: set3 8388656("800030) type=0 h:=3783588+630598=4414186, hh:=280 +925: w0 199410 h:=4414186+199410=4613596, hh:=292 +926: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +929: w0 199410 h:=4845374+199410=5044784, hh:=320 +930: set3 8388657("800031) type=0 h:=5044784+630598=5675382, hh:=360 +934: w0 199410 h:=5675382+199410=5874792, hh:=372 +935: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +938: w0 199410 h:=6106570+199410=6305980, hh:=399 +939: set3 8388658("800032) type=0 h:=6305980+630598=6936578, hh:=439 +943: w0 199410 h:=6936578+199410=7135988, hh:=452 +944: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +947: w0 199410 h:=7367766+199410=7567176, hh:=479 +948: set3 8388664("800038) type=0 h:=7567176+630598=8197774, hh:=519 +952: w0 199410 h:=8197774+199410=8397184, hh:=532 +953: set2 12539("30FB) type=4 h:=8397184+231778=8628962, hh:=547 +956: w0 199410 h:=8628962+199410=8828372, hh:=559 +[#️⃣ ・ *️⃣ ・ 0️⃣ ・ 1️⃣ ・ 2️⃣ ・ 8️⃣ ・ 9️] +957: set3 8388665("800039) type=0 h:=8828372+630598=9458970, hh:=599 +[⃣] +961: pop +level 1:(h=0,v=11665408,w=0,x=0,y=786432,z=0,hh=0,vv=739) +962: y0 786432 v:=11665408+786432=12451840, vv:=789 +963: push +level 1:(h=0,v=12451840,w=0,x=0,y=786432,z=0,hh=0,vv=789) +964: set3 8388643("800023) type=0 h:=0+630598=630598, hh:=40 +968: w3 199410 h:=630598+199410=830008, hh:=53 +972: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +975: w0 199410 h:=1061786+199410=1261196, hh:=80 +976: set3 8388650("80002A) type=0 h:=1261196+630598=1891794, hh:=120 +980: w0 199410 h:=1891794+199410=2091204, hh:=132 +981: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +984: w0 199410 h:=2322982+199410=2522392, hh:=160 +985: set3 8388656("800030) type=0 h:=2522392+630598=3152990, hh:=200 +989: w0 199410 h:=3152990+199410=3352400, hh:=212 +990: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +993: w0 199410 h:=3584178+199410=3783588, hh:=240 +994: set3 8388657("800031) type=0 h:=3783588+630598=4414186, hh:=280 +998: w0 199410 h:=4414186+199410=4613596, hh:=292 +999: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +1002: w0 199410 h:=4845374+199410=5044784, hh:=320 +1003: set3 8388658("800032) type=0 h:=5044784+630598=5675382, hh:=360 +1007: w0 199410 h:=5675382+199410=5874792, hh:=372 +1008: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +1011: w0 199410 h:=6106570+199410=6305980, hh:=399 +1012: set3 8388664("800038) type=0 h:=6305980+630598=6936578, hh:=439 +1016: w0 199410 h:=6936578+199410=7135988, hh:=452 +1017: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +1020: w0 199410 h:=7367766+199410=7567176, hh:=479 +[#️⃣ ・ *️⃣ ・ 0️⃣ ・ 1️⃣ ・ 2️⃣ ・ 8️⃣ ・ 9️] +1021: set3 8388665("800039) type=0 h:=7567176+630598=8197774, hh:=519 +[⃣] +1025: pop +level 1:(h=0,v=12451840,w=0,x=0,y=786432,z=0,hh=0,vv=789) +1026: y0 786432 v:=12451840+786432=13238272, vv:=839 +1027: push +level 1:(h=0,v=13238272,w=0,x=0,y=786432,z=0,hh=0,vv=839) +1028: set3 16535040("FC4E00) type=0 h:=0+630598=630598, hh:=40 +1032: w3 199410 h:=630598+199410=830008, hh:=53 +1036: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +1039: w0 199410 h:=1061786+199410=1261196, hh:=80 +1040: set4 16797324("1004E8C) type=0 h:=1261196+630598=1891794, hh:=120 +1045: w0 199410 h:=1891794+199410=2091204, hh:=132 +1046: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +1049: w0 199410 h:=2322982+199410=2522392, hh:=160 +1050: set4 17059337("1044E09) type=0 h:=2522392+630598=3152990, hh:=200 +1055: w0 199410 h:=3152990+199410=3352400, hh:=212 +1056: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +1059: w0 199410 h:=3584178+199410=3783588, hh:=240 +1060: set4 33576667("20056DB) type=0 h:=3783588+630598=4414186, hh:=280 +1065: w0 199410 h:=4414186+199410=4613596, hh:=292 +1066: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +1069: w0 199410 h:=4845374+199410=5044784, hh:=320 +1070: set4 62934676("3C04E94) type=0 h:=5044784+630598=5675382, hh:=360 +1075: w0 199410 h:=5675382+199410=5874792, hh:=372 +1076: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +1079: w0 199410 h:=6106570+199410=6305980, hh:=399 +1080: set4 66867565("3FC516D) type=0 h:=6305980+630598=6936578, hh:=439 +1085: w0 199410 h:=6936578+199410=7135988, hh:=452 +1086: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +1089: w0 199410 h:=7367766+199410=7567176, hh:=479 +[一󠄟 ・ 二󠄠 ・ 三󠄡 ・ 四󠅠 ・ 五󠇐 ・ 六󠇟 ・ 七] +1090: set4 71060995("43C4E03) type=0 h:=7567176+630598=8197774, hh:=519 +[󠇯] +1095: pop +level 1:(h=0,v=13238272,w=0,x=0,y=786432,z=0,hh=0,vv=839) +1096: y0 786432 v:=13238272+786432=14024704, vv:=888 +1097: push +level 1:(h=0,v=14024704,w=0,x=0,y=786432,z=0,hh=0,vv=888) +1098: set3 16535040("FC4E00) type=0 h:=0+630598=630598, hh:=40 +1102: w3 199410 h:=630598+199410=830008, hh:=53 +1106: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +1109: w0 199410 h:=1061786+199410=1261196, hh:=80 +1110: set4 16797324("1004E8C) type=0 h:=1261196+630598=1891794, hh:=120 +1115: w0 199410 h:=1891794+199410=2091204, hh:=132 +1116: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +1119: w0 199410 h:=2322982+199410=2522392, hh:=160 +1120: set4 17059337("1044E09) type=0 h:=2522392+630598=3152990, hh:=200 +1125: w0 199410 h:=3152990+199410=3352400, hh:=212 +1126: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +1129: w0 199410 h:=3584178+199410=3783588, hh:=240 +1130: set4 33576667("20056DB) type=0 h:=3783588+630598=4414186, hh:=280 +1135: w0 199410 h:=4414186+199410=4613596, hh:=292 +1136: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +1139: w0 199410 h:=4845374+199410=5044784, hh:=320 +1140: set4 62934676("3C04E94) type=0 h:=5044784+630598=5675382, hh:=360 +1145: w0 199410 h:=5675382+199410=5874792, hh:=372 +1146: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +1149: w0 199410 h:=6106570+199410=6305980, hh:=399 +1150: set4 66867565("3FC516D) type=0 h:=6305980+630598=6936578, hh:=439 +1155: w0 199410 h:=6936578+199410=7135988, hh:=452 +1156: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +1159: w0 199410 h:=7367766+199410=7567176, hh:=479 +[一󠄟 ・ 二󠄠 ・ 三󠄡 ・ 四󠅠 ・ 五󠇐 ・ 六󠇟 ・ 七] +1160: set4 71060995("43C4E03) type=0 h:=7567176+630598=8197774, hh:=519 +[󠇯] +1165: pop +level 1:(h=0,v=14024704,w=0,x=0,y=786432,z=0,hh=0,vv=888) +1166: y0 786432 v:=14024704+786432=14811136, vv:=938 +1167: push +level 1:(h=0,v=14811136,w=0,x=0,y=786432,z=0,hh=0,vv=938) +1168: set3 16535040("FC4E00) type=0 h:=0+630598=630598, hh:=40 +1172: w3 199410 h:=630598+199410=830008, hh:=53 +1176: set2 12539("30FB) type=4 h:=830008+231778=1061786, hh:=68 +1179: w0 199410 h:=1061786+199410=1261196, hh:=80 +1180: set4 16797324("1004E8C) type=0 h:=1261196+630598=1891794, hh:=120 +1185: w0 199410 h:=1891794+199410=2091204, hh:=132 +1186: set2 12539("30FB) type=4 h:=2091204+231778=2322982, hh:=147 +1189: w0 199410 h:=2322982+199410=2522392, hh:=160 +1190: set4 17059337("1044E09) type=0 h:=2522392+630598=3152990, hh:=200 +1195: w0 199410 h:=3152990+199410=3352400, hh:=212 +1196: set2 12539("30FB) type=4 h:=3352400+231778=3584178, hh:=227 +1199: w0 199410 h:=3584178+199410=3783588, hh:=240 +1200: set4 33576667("20056DB) type=0 h:=3783588+630598=4414186, hh:=280 +1205: w0 199410 h:=4414186+199410=4613596, hh:=292 +1206: set2 12539("30FB) type=4 h:=4613596+231778=4845374, hh:=307 +1209: w0 199410 h:=4845374+199410=5044784, hh:=320 +1210: set4 62934676("3C04E94) type=0 h:=5044784+630598=5675382, hh:=360 +1215: w0 199410 h:=5675382+199410=5874792, hh:=372 +1216: set2 12539("30FB) type=4 h:=5874792+231778=6106570, hh:=387 +1219: w0 199410 h:=6106570+199410=6305980, hh:=399 +1220: set4 66867565("3FC516D) type=0 h:=6305980+630598=6936578, hh:=439 +1225: w0 199410 h:=6936578+199410=7135988, hh:=452 +1226: set2 12539("30FB) type=4 h:=7135988+231778=7367766, hh:=467 +1229: w0 199410 h:=7367766+199410=7567176, hh:=479 +[一󠄟 ・ 二󠄠 ・ 三󠄡 ・ 四󠅠 ・ 五󠇐 ・ 六󠇟 ・ 七] +1230: set4 71060995("43C4E03) type=0 h:=7567176+630598=8197774, hh:=519 +[󠇯] +1235: pop +level 1:(h=0,v=14811136,w=0,x=0,y=786432,z=0,hh=0,vv=938) +1236: pop +level 0:(h=0,v=42152922,w=0,x=0,y=0,z=0,hh=0,vv=2670) +1237: down3 1572864 v:=42152922+1572864=43725786, vv:=2770 +1241: push +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=2770) +1242: right4 15229091 h:=0+15229091=15229091, hh:=965 +[ ] +1247: fntdef1 0: cmr10 +1268: fntnum0 current font is cmr10 +1269: setchar49 ("31) h:=15229091+327681=15556772, hh:=986 +[1] +1270: pop +level 0:(h=0,v=43725786,w=0,x=0,y=0,z=0,hh=0,vv=2770) +1271: eop diff --git a/Build/source/texk/web2c/uptexdir/upbibtex.ch b/Build/source/texk/web2c/uptexdir/upbibtex.ch index 0e8c0a4d0b9..36c44471552 100644 --- a/Build/source/texk/web2c/uptexdir/upbibtex.ch +++ b/Build/source/texk/web2c/uptexdir/upbibtex.ch @@ -60,7 +60,7 @@ @d banner=='This is BibTeX, Version 0.99d' {printed when the program starts} @y @d my_name=='upbibtex' -@d banner=='This is upBibTeX, Version 0.99d-j0.36-u1.30' +@d banner=='This is upBibTeX, Version 0.99d-j0.36-u1.35' {printed when the program starts} @z diff --git a/Build/source/texk/web2c/uptexdir/updvitype.ch b/Build/source/texk/web2c/uptexdir/updvitype.ch index 1e5224eb941..52349a28aef 100644 --- a/Build/source/texk/web2c/uptexdir/updvitype.ch +++ b/Build/source/texk/web2c/uptexdir/updvitype.ch @@ -9,7 +9,7 @@ @d banner=='This is DVItype, Version 3.6' {printed when the program starts} @y @d my_name=='updvitype' -@d banner=='This is upDVItype, Version 3.6-p221203' +@d banner=='This is upDVItype, Version 3.6-p240427' {printed when the program starts} @z @@ -167,13 +167,33 @@ if c>=177 then text_buf[text_ptr]:=@'77 else text_buf[text_ptr]:=c; end; @ @p procedure out_kanji(c:integer); +var @!v,@!n,@!jj: integer; begin - if text_ptr>=line_length-5 then flush_text; - c:=toBUFF(fromDVI(c)); - if BYTE1(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE1(c); end; - if BYTE2(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE2(c); end; - if BYTE3(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE3(c); end; - incr(text_ptr); text_buf[text_ptr]:=BYTE4(c); + if (isinternalUPTEX) then begin + c:=fromDVI(c); + n:=UVSgetcodepointlength(c); + jj:=1; + while jj<=n do begin + v:=UVSgetcodepointinsequence(c,jj); + if (v>0) then begin + if text_ptr>=line_length-5 then flush_text; + v:=UCStoUTF8(v); + if BYTE1(v)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE1(v); end; + if BYTE2(v)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE2(v); end; + if BYTE3(v)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE3(v); end; + incr(text_ptr); text_buf[text_ptr]:=BYTE4(v); + end; + incr(jj); + end + end + else begin + if text_ptr>=line_length-5 then flush_text; + c:=toBUFF(fromDVI(c)); + if BYTE1(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE1(c); end; + if BYTE2(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE2(c); end; + if BYTE3(c)<>0 then begin incr(text_ptr); text_buf[text_ptr]:=BYTE3(c); end; + incr(text_ptr); text_buf[text_ptr]:=BYTE4(c); + end; end; @ output hexdecimal / octal character code. diff --git a/Build/source/texk/web2c/uptexdir/updvitype.test b/Build/source/texk/web2c/uptexdir/updvitype.test index 5bb559f934e..59627e4cf16 100755 --- a/Build/source/texk/web2c/uptexdir/updvitype.test +++ b/Build/source/texk/web2c/uptexdir/updvitype.test @@ -38,7 +38,7 @@ for doc in ptex3 ptex4; do done done -for doc in uptex3 uptex4; do +for doc in uptex3 uptex4 uptex5; do $_updvitype $srcdir/uptexdir/tests/$doc.dvi >uptests/x$doc.typ || rc=5 sed 1d uptests/x$doc.typ >uptests/x${doc}a.typ diff $srcdir/uptexdir/tests/${doc}a.typ uptests/x${doc}a.typ || rc=6 diff --git a/Build/source/texk/web2c/uptexdir/uppltotf.ch b/Build/source/texk/web2c/uptexdir/uppltotf.ch index 4c6b7fb9dfc..15138a657cd 100644 --- a/Build/source/texk/web2c/uptexdir/uppltotf.ch +++ b/Build/source/texk/web2c/uptexdir/uppltotf.ch @@ -1,5 +1,6 @@ % This is a change file for PLtoTF % +% (2024-04-27) TTK Support upTeX new encoding for combining characters % (2023-09-17) HY Support more than 256 different glue/kern % (2022-12-03) TTK Merge pPLtoTF source/binary into upPLtoTF % (2018-01-27) HY pPLtoTF p2.0 - new JFM spec by texjporg @@ -18,7 +19,7 @@ @d banner=='This is PLtoTF, Version 3.6' {printed when the program starts} @y @d my_name=='uppltotf' -@d banner=='This is upPLtoTF, Version 3.6-p230917' +@d banner=='This is upPLtoTF, Version 3.6-p240427' {printed when the program starts} @z @@ -361,8 +362,8 @@ incr(current_option); We need to include some routines for handling kanji characters. @<Constants...@>= -max_kanji=1114111; { maximam number of 2byte characters } -max_kanji_code=@"10FFFF; { maximum ucs code } +max_kanji=@"2FFFFF; { maximam number of multibyte characters } +max_kanji_code=@"2FFFFF; { maximum ucs code } yoko_id_number=11; { is identifier for YOKO-kumi font} tate_id_number=9; { is identifier for TATE-kumi font} @@ -654,7 +655,7 @@ end; @# function valid_jis_code(cx:integer):boolean; begin valid_jis_code:=true; -if (cx>@"10FFFF)or(not is_char_kanji(fromDVI(cx))) +if (cx>max_kanji)or(not is_char_kanji(fromDVI(cx))) or(toDVI(fromDVI(cx))<>cx) then valid_jis_code:=false; end; @# @@ -690,12 +691,23 @@ else if (ch='U')or(ch='u') then @<Scan a Kanji hexadecimal code@>; jis_code:=toDVI(fromUCS(cx)); cur_char:=ch; if not valid_jis_code(jis_code) then - err_print('jis code ', jis_code:1, ' is invalid'); + err_print('ucs code ', jis_code:1, ' is invalid'); end else if multistrlen(ustringcast(buffer), loc+4, loc)>1 then begin cur_char:=" "; - jis_code:=toDVI(fromBUFF(ustringcast(buffer), loc+4, loc)); + jis_code:=fromBUFF(ustringcast(buffer), loc+4, loc); loc:=loc+multistrlen(ustringcast(buffer), loc+4, loc)-1; + if (isinternalUPTEX) then + begin + cx:=fromBUFF(ustringcast(buffer), loc+5, loc+1); + if (UVScombinecode(jis_code,cx)>0) then begin + jis_code:=UVScombinecode(jis_code,cx); + loc:=loc+multistrlen(ustringcast(buffer), loc+5, loc+1); + end; + end + else begin + jis_code:=toDVI(jis_code) + end; if not valid_jis_code(jis_code) then err_print('jis code ', jis_code:1, ' is invalid'); end diff --git a/Build/source/texk/web2c/uptexdir/uptex-m.ch b/Build/source/texk/web2c/uptexdir/uptex-m.ch index f8698ab9af1..8c0f662087c 100644 --- a/Build/source/texk/web2c/uptexdir/uptex-m.ch +++ b/Build/source/texk/web2c/uptexdir/uptex-m.ch @@ -1,5 +1,5 @@ % $Id$ -% This is a change file for upTeX u1.30 +% This is a change file for upTeX u1.35 % By Takuji Tanaka. % % (02/26/2007) TTK upTeX u0.01 @@ -48,6 +48,7 @@ % (2022-07-23) TTK upTeX u1.29 % (2022-12-09) HK Hironori Kitagawa fixed a bug in \char, \kchar. % (2023-09-16) TTK upTeX u1.30 +% (2024-04-27) TTK upTeX u1.35 @x \def\pTeX{p\kern-.15em\TeX} @@ -62,8 +63,8 @@ {printed when \pTeX\ starts} @# @d upTeX_version=1 -@d upTeX_revision==".30" -@d upTeX_version_string=='-u1.30' {current \upTeX\ version} +@d upTeX_revision==".35" +@d upTeX_version_string=='-u1.35' {current \upTeX\ version} @# @d upTeX_banner=='This is upTeX, Version 3.141592653',pTeX_version_string,upTeX_version_string @d upTeX_banner_k==upTeX_banner @@ -165,6 +166,8 @@ else if (kcode_pos=1)or((kcode_pos>=@'11)and(kcode_pos<=@'12)) @d min_halfword=-@"3FFFFFFF {smallest allowable value in a |halfword|} @d max_halfword=@"3FFFFFFF {largest allowable value in a |halfword|} @d max_cjk_val=@"1000000 {to separate wchar and kcatcode} +@d max_ivs_val=@"4400000 {to separate wchar with ivs and kcatcode} +@d max_ucs_val=@"110000 {largest Unicode Scalar Value} @z @x @@ -173,12 +176,15 @@ else if (kcode_pos=1)or((kcode_pos>=@'11)and(kcode_pos<=@'12)) @d other_kchar=18 {kanji codes} @d max_char_code=18 {largest catcode for individual characters} @y +@d latin_ucs=14 {is not cjk characters in ucs code} @d not_cjk=15 {is not cjk characters} @d kanji=16 {kanji} @d kana=17 {hiragana, katakana, alphabet} @d other_kchar=18 {cjk symbol codes} @d hangul=19 {hangul codes} -@d max_char_code=19 {largest catcode for individual characters} +@d modifier=20 {modifier codes} +@d kanji_ivs=23 {kanji with ivs codes} +@d max_char_code=20 {largest catcode for individual characters} @z @x @@ -273,9 +279,16 @@ if (isinternalUPTEX) then begin @t\hskip10pt@>kcat_code(@"93):=hangul; { Hangul Syllables } @t\hskip10pt@>kcat_code(@"94):=hangul; { Hangul Jamo Extended-B } @t\hskip10pt@>kcat_code(@"99):=kanji; { CJK Compatibility Ideographs } + @t\hskip10pt@>kcat_code(@"9C):=modifier; { Variation Selectors } { \hskip10pt|kcat_code(@"A2):=other_kchar;| Halfwidth and Fullwidth Forms } @+@t\1@>for k:=@"10D to @"110 do kcat_code(k):=kana; { Kana Extended-B .. Small Kana Extension } @+@t\1@>for k:=@"13B to @"143 do kcat_code(k):=kanji; { CJK Unified Ideographs Extension B .. H } + @t\hskip10pt@>kcat_code(@"150):=modifier; { Variation Selectors Supplement } + @+@t\1@>for k:=@"165 to @"166 do kcat_code(k):=kana; { Kana with (Semi-)Voiced Sound Mark } + @t\hskip10pt@>kcat_code(@"16A):=kanji; { Standardized Variation Sequence } + @+@t\1@>for k:=@"16C to @"16D do kcat_code(k):=kanji; { Ideographic Variation Sequence } + @+@t\1@>for k:=@"1F9 to @"1FC do kcat_code(k):=modifier; + { Combining Katakana-Hiragana (Semi-)Voiced Sound Mark .. Emoji Modifier Fitzpatrick } @t\hskip10pt@>kcat_code(@"1FD):=not_cjk; { Latin-1 Letters } @t\hskip10pt@>kcat_code(@"1FE):=kana; { Fullwidth digit and latin alphabet } @t\hskip10pt@>kcat_code(@"1FF):=kana; { Halfwidth katakana } @@ -347,20 +360,23 @@ kchar_num: print_esc("kchar"); else begin m:=Hi(info(p)); c:=Lo(info(p)); @y if check_kanji(info(p)) then {|wchar_token|} - begin m:=info(p) div max_cjk_val; c:=info(p) mod max_cjk_val; end + begin + m:=ktokentocmd(info(p)); + c:=ktokentochr(info(p)); + end else begin m:=info(p) div max_char_val; c:=info(p) mod max_char_val; @z @x kanji,kana,other_kchar: print_kanji(KANJI(c)); @y -kanji,kana,other_kchar,hangul: print_kanji(KANJI(c)); +kanji,kana,other_kchar,hangul,modifier: print_kanji(KANJI(c)); @z @x kanji,kana,other_kchar: begin print("kanji character "); @y -kanji,kana,other_kchar,hangul: begin print("kanji character "); +kanji,kana,other_kchar,hangul,modifier: begin print("kanji character "); @z @x @@ -392,7 +408,7 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10); @x s:=get_avail; info(s):=Lo(info(loc)); @y - s:=get_avail; info(s):=(info(loc) mod max_char_val); + s:=get_avail; info(s):=ktokentochr(info(loc)); @z @x @@ -409,7 +425,8 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10); begin cur_chr:=fromBUFF(ustringcast(buffer), limit+1, loc); cur_cmd:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(ustringcast(buffer), limit+1, loc)>1) and check_kcat_code(cur_cmd) then begin + if (multistrlen(ustringcast(buffer), limit+1, loc)>1) and check_kcat_code(cur_cmd,cur_chr) then begin + if (cur_cmd=latin_ucs) then cur_cmd:=cat_code(cur_chr); if (cur_cmd=not_cjk) then cur_cmd:=other_kchar; for l:=loc to loc-1+multistrlen(ustringcast(buffer), limit+1, loc) do buffer2[l]:=1; @@ -427,7 +444,7 @@ if ((kcp mod @'10)>0)and(nrestmultichr(kcp)>0) then p:=p-(kcp mod @'10); @y @ @d add_delims_to(#)==#+math_shift,#+tab_mark,#+mac_param, #+sub_mark,#+letter,#+other_char -@d all_jcode(#)==#+kanji,#+kana,#+other_kchar +@d all_jcode(#)==#+kanji,#+kana,#+other_kchar,#+modifier @d hangul_code(#)==#+hangul @z @@ -459,7 +476,8 @@ start_cs: else begin k:=loc; cur_chr:=fromBUFF(ustringcast(buffer), limit+1, k); cat:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat) then begin + if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat,cur_chr) then begin + if (cat=latin_ucs) then cat:=cat_code(cur_chr); if (cat=not_cjk) then cat:=other_kchar; for l:=k to k-1+multistrlen(ustringcast(buffer), limit+1, k) do buffer2[l]:=1; @@ -476,13 +494,13 @@ start_cs: @x else if ((cat=letter)or(cat=kanji)or(cat=kana))and(k<=limit) then @y - else if ((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul))and(k<=limit) then + else if ((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul)or(cat=modifier))and(k<=limit) then @z @x if (cat=kanji)or(cat=kana) then @y - if (cat=kanji)or(cat=kana)or(cat=hangul) then + if (cat=kanji)or(cat=kana)or(cat=hangul)or(cat=modifier) then @z @x @@ -501,7 +519,8 @@ begin repeat cur_chr:=buffer[k]; incr(k); begin repeat cur_chr:=fromBUFF(ustringcast(buffer), limit+1, k); cat:=kcat_code(kcatcodekey(cur_chr)); - if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat) then begin + if (multistrlen(ustringcast(buffer), limit+1, k)>1) and check_kcat_code(cat,cur_chr) then begin + if (cat=latin_ucs) then cat:=cat_code(cur_chr); if (cat=not_cjk) then cat:=other_kchar; for l:=k to k-1+multistrlen(ustringcast(buffer), limit+1, k) do buffer2[l]:=1; @@ -524,9 +543,9 @@ until not((cat=letter)or(cat=kanji)or(cat=kana))or(k>limit); if not((cat=letter)or(cat=kanji)or(cat=kana)) then decr(k); if cat=other_kchar then decr(k); {now |k| points to first nonletter} @y -until not((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul))or(k>limit); +until not((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul)or(cat=modifier))or(k>limit); {@@<If an expanded...@@>;} -if not((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul)) then decr(k); +if not((cat=letter)or(cat=kanji)or(cat=kana)or(cat=hangul)or(cat=modifier)) then decr(k); if cat=other_kchar then k:=k-multilenbuffchar(cur_chr)+1; {now |k| points to first nonletter} @z @@ -538,22 +557,37 @@ if cat=other_kchar then k:=k-multilenbuffchar(cur_chr)+1; {now |k| points to fir begin cur_cmd:=Hi(t); cur_chr:=Lo(t); @y else if check_kanji(t) then {|wchar_token|} - begin cur_cmd:=t div max_cjk_val; cur_chr:=t mod max_cjk_val; end + begin + cur_cmd:=ktokentocmd(t); + cur_chr:=ktokentochr(t); + end else begin cur_cmd:=t div max_char_val; cur_chr:=t mod max_char_val; @z -@x +@x get_token if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then {|wchar_token|} cur_tok:=cur_chr else cur_tok:=(cur_cmd*@'400)+cur_chr @y - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|} - cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then {|wchar_token|} + if (cur_cmd=kanji)and(cur_chr>=max_cjk_val) then + cur_tok:=(kanji_ivs*max_cjk_val)+cur_chr + else + cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + else if (cur_cmd=latin_ucs) then + cur_tok:=(cat_code(cur_chr)*max_cjk_val)+cur_chr else cur_tok:=(cur_cmd*max_char_val)+cur_chr @z @x +@!j:0..buf_size; {index into |buffer|} +@y +@!j:0..buf_size; {index into |buffer|} +@!v,@!nn,@!jj: integer; +@z + +@x if check_kanji(info(p)) then {|wchar_token|} begin buffer[j]:=Hi(info(p)); buffer2[j]:=1; incr(j); buffer2[j]:=1; end @@ -561,11 +595,31 @@ if cat=other_kchar then k:=k-multilenbuffchar(cur_chr)+1; {now |k| points to fir buffer[j]:=Lo(info(p)); incr(j); p:=link(p); @y if check_kanji(info(p)) then {|wchar_token|} - begin t:=toBUFF(info(p) mod max_cjk_val); - if BYTE1(t)<>0 then begin buffer[j]:=BYTE1(t); buffer2[j]:=1; incr(j); end; - if BYTE2(t)<>0 then begin buffer[j]:=BYTE2(t); buffer2[j]:=1; incr(j); end; - if BYTE3(t)<>0 then begin buffer[j]:=BYTE3(t); buffer2[j]:=1; incr(j); end; - buffer[j]:=BYTE4(t); buffer2[j]:=1; incr(j); + begin + if (isinternalUPTEX) then begin + t:=ktokentochr(info(p)); + t:=toUCS(t); + nn:=UVSgetcodepointlength(t); + jj:=1; + while jj<nn do begin + v:=UVSgetcodepointinsequence(t,jj); + if (v>0) then begin + v:=UCStoUTF8(v); + if BYTE1(v)<>0 then begin buffer[j]:=BYTE1(v); buffer2[j]:=1; incr(j); end; + if BYTE2(v)<>0 then begin buffer[j]:=BYTE2(v); buffer2[j]:=1; incr(j); end; + if BYTE3(v)<>0 then begin buffer[j]:=BYTE3(v); buffer2[j]:=1; incr(j); end; + buffer[j]:=BYTE4(v); buffer2[j]:=1; incr(j); + end; + incr(jj); + end + end + else begin + t:=toBUFF(info(p) mod max_cjk_val); + if BYTE1(t)<>0 then begin buffer[j]:=BYTE1(t); buffer2[j]:=1; incr(j); end; + if BYTE2(t)<>0 then begin buffer[j]:=BYTE2(t); buffer2[j]:=1; incr(j); end; + if BYTE3(t)<>0 then begin buffer[j]:=BYTE3(t); buffer2[j]:=1; incr(j); end; + buffer[j]:=BYTE4(t); buffer2[j]:=1; incr(j); + end; p:=link(p); end else @@ -573,23 +627,33 @@ if cat=other_kchar then k:=k-multilenbuffchar(cur_chr)+1; {now |k| points to fir end; @z -@x +@x get_x_token if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then cur_tok:=cur_chr else cur_tok:=(cur_cmd*@'400)+cur_chr @y - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then - cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then + if (cur_cmd=kanji)and(cur_chr>=max_cjk_val) then + cur_tok:=(kanji_ivs*max_cjk_val)+cur_chr + else + cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + else if (cur_cmd=latin_ucs) then + cur_tok:=(cat_code(cur_chr)*max_cjk_val)+cur_chr else cur_tok:=(cur_cmd*max_char_val)+cur_chr @z -@x +@x x_token if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then cur_tok:=cur_chr else cur_tok:=(cur_cmd*@'400)+cur_chr @y - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then - cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then + if (cur_cmd=kanji)and(cur_chr>=max_cjk_val) then + cur_tok:=(kanji_ivs*max_cjk_val)+cur_chr + else + cur_tok:=(cur_cmd*max_cjk_val)+cur_chr + else if (cur_cmd=latin_ucs) then + cur_tok:=(cat_code(cur_chr)*max_cjk_val)+cur_chr else cur_tok:=(cur_cmd*max_char_val)+cur_chr @z @@ -634,7 +698,7 @@ primitive("uptexversion",last_item,uptex_version_code); @x if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then {|wchar_token|} @y - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|} + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then {|wchar_token|} @z @x @@ -659,7 +723,9 @@ while k<pool_ptr do begin t:=so(str_pool[k]); if t>=@"180 then { there is no |wchar_token| whose code is 0--127. } begin t:=fromBUFFshort(str_pool, pool_ptr, k); cc:=kcat_code(kcatcodekey(t)); + if (cc=latin_ucs) then cc:=other_char; if (cc=not_cjk) then cc:=other_kchar; + if (cc=kanji)and(t>=max_cjk_val) then cc:=kanji_ivs; t:=t+cc*max_cjk_val; k:=k+multistrlenshort(str_pool, pool_ptr, k)-1; end @@ -705,7 +771,7 @@ string_code, meaning_code: begin save_scanner_status:=scanner_status; ptex_revision_code, uptex_revision_code: do_nothing; string_code, meaning_code: begin save_scanner_status:=scanner_status; scanner_status:=normal; get_token; - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|} + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then {|wchar_token|} @z @x @@ -732,7 +798,7 @@ uptex_revision_code: print(upTeX_revision); @x if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then @y -if (cur_cmd>=kanji)and(cur_cmd<=hangul) then +if (cur_cmd>=kanji)and(cur_cmd<=modifier) then @z @x @@ -740,7 +806,22 @@ get_x_token_or_active_char; if (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar) then @y get_x_token_or_active_char; -if (cur_cmd>=kanji)and(cur_cmd<=hangul) then +if (cur_cmd>=kanji)and(cur_cmd<=modifier) then +@z + +@x +@p procedure scan_file_name; +label done; +var + @!save_warning_index: pointer; +begin +@y +@p procedure scan_file_name; +label done; +var + @!save_warning_index: pointer; + @!v,@!nn,@!jj: integer; +begin @z @x @@ -749,13 +830,33 @@ if (cur_cmd>=kanji)and(cur_cmd<=hangul) then append_char(@"100+Hi(cur_chr)); {kanji upper byte} append_char(@"100+Lo(cur_chr)); {kanji lower byte} @y - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then {|wchar_token|} - begin str_room(4); {4 is maximum} - cur_chr:=toBUFF(cur_chr); - if BYTE1(cur_chr)<>0 then append_char(@"100+BYTE1(cur_chr)); - if BYTE2(cur_chr)<>0 then append_char(@"100+BYTE2(cur_chr)); - if BYTE3(cur_chr)<>0 then append_char(@"100+BYTE3(cur_chr)); - append_char(@"100+BYTE4(cur_chr)); + if (cur_cmd>=kanji)and(cur_cmd<=modifier) then {|wchar_token|} + begin + if (isinternalUPTEX) then begin + cur_chr:=toUCS(cur_chr); + nn:=UVSgetcodepointlength(cur_chr); + jj:=1; + while jj<=nn do begin + v:=UVSgetcodepointinsequence(cur_chr,jj); + if (v>0) then begin + str_room(4); + v:=UCStoUTF8(v); + if BYTE1(v)<>0 then append_char(@"100+BYTE1(v)); + if BYTE2(v)<>0 then append_char(@"100+BYTE2(v)); + if BYTE3(v)<>0 then append_char(@"100+BYTE3(v)); + append_char(@"100+BYTE4(v)); + end; + incr(jj); + end + end + else begin + str_room(4); {4 is maximum} + cur_chr:=toBUFF(cur_chr); + if BYTE1(cur_chr)<>0 then append_char(@"100+BYTE1(cur_chr)); + if BYTE2(cur_chr)<>0 then append_char(@"100+BYTE2(cur_chr)); + if BYTE3(cur_chr)<>0 then append_char(@"100+BYTE3(cur_chr)); + append_char(@"100+BYTE4(cur_chr)); + end; @z @x @@ -763,12 +864,13 @@ if (cur_cmd>=kanji)and(cur_cmd<=hangul) then @y @d set2=129 {typeset a character and move right} @d set3=130 {typeset a character and move right} +@d set4=131 {typeset a character and move right} @z @x jc:=KANJI(info(p)); @y - jc:=KANJI(info(p)) mod max_cjk_val; + jc:=ktokentochr(info(p)); @z @x @@ -776,8 +878,10 @@ if (cur_cmd>=kanji)and(cur_cmd<=hangul) then @y if (jc<@"10000) then begin dvi_out(set2); - end else begin + end else if (jc<@"1000000) then begin dvi_out(set3); dvi_out(BYTE2(jc)); + end else begin + dvi_out(set4); dvi_out(BYTE1(jc)); dvi_out(BYTE2(jc)); end; dvi_out(BYTE3(jc)); dvi_out(BYTE4(jc)); @z @@ -794,7 +898,7 @@ hmode+no_boundary: begin get_x_token; (cur_cmd=kanji)or(cur_cmd=kana)or(cur_cmd=other_kchar)or (cur_cmd=char_given)or(cur_cmd=char_num) then cancel_boundary:=true; @y -hmode+kanji,hmode+kana,hmode+other_kchar,hmode+hangul: goto main_loop_j; +hmode+kanji,hmode+kana,hmode+other_kchar,hmode+hangul,hmode+modifier: goto main_loop_j; hmode+char_given: if check_echar_range(cur_chr) then goto main_loop else begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); goto main_loop_j; end; @@ -810,7 +914,7 @@ hmode+kchar_num: begin scan_char_num; cur_chr:=cur_val; end; hmode+no_boundary: begin get_x_token; if (cur_cmd=letter)or(cur_cmd=other_char)or - ((cur_cmd>=kanji)and(cur_cmd<=hangul))or + ((cur_cmd>=kanji)and(cur_cmd<=modifier))or (cur_cmd=char_given)or(cur_cmd=char_num)or (cur_cmd=kchar_given)or(cur_cmd=kchar_num) then cancel_boundary:=true; @z @@ -840,7 +944,7 @@ if cur_cmd=char_num then end; @y if cur_cmd=letter then goto main_loop_lookahead+1; -if (cur_cmd>=kanji)and(cur_cmd<=hangul) then +if (cur_cmd>=kanji)and(cur_cmd<=modifier) then @<goto |main_lig_loop|@>; if cur_cmd=other_char then goto main_loop_lookahead+1; if cur_cmd=char_given then @@ -851,7 +955,7 @@ if cur_cmd=kchar_given then begin cur_cmd:=kcat_code(kcatcodekey(cur_chr)); @<goto |main_lig_loop|@>; end; x_token; {now expand and set |cur_cmd|, |cur_chr|, |cur_tok|} if cur_cmd=letter then goto main_loop_lookahead+1; -if (cur_cmd>=kanji)and(cur_cmd<=hangul) then +if (cur_cmd>=kanji)and(cur_cmd<=modifier) then @<goto |main_lig_loop|@>; if cur_cmd=other_char then goto main_loop_lookahead+1; if cur_cmd=char_given then @@ -882,7 +986,7 @@ vmode+letter,vmode+other_char,vmode+char_num,vmode+char_given, vmode+kchar_num,vmode+kchar_given, vmode+math_shift,vmode+un_hbox,vmode+vrule, vmode+accent,vmode+discretionary,vmode+hskip,vmode+valign, - vmode+kanji,vmode+kana,vmode+other_kchar,vmode+hangul, + vmode+kanji,vmode+kana,vmode+other_kchar,vmode+hangul,vmode+modifier, @z @x @@ -902,7 +1006,10 @@ if check_echar_range(cur_val)=0 then if p<>null then begin link(p):=get_avail; - info(link(p)):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; + if (kcat_code(kcatcodekey(cx))=kanji)and(cx>=max_cjk_val) then + info(link(p)):=KANJI(cx) + kanji_ivs*max_cjk_val + else + info(link(p)):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; end; @z @@ -930,7 +1037,7 @@ else if cur_cmd=char_given then @y if (cur_cmd=letter)or(cur_cmd=other_char) then q:=new_character(f,cur_chr) -else if (cur_cmd>=kanji)and(cur_cmd<=hangul) then +else if (cur_cmd>=kanji)and(cur_cmd<=modifier) then begin if direction=dir_tate then f:=cur_tfont else f:=cur_jfont; cx:=cur_chr; end @@ -966,7 +1073,10 @@ else if cur_cmd=kchar_num then @y begin q:=new_character(f,get_jfm_pos(KANJI(cx),f)); link(q):=get_avail; - info(link(q)):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; + if (kcat_code(kcatcodekey(cx))=kanji)and(cx>=max_cjk_val) then + info(link(q)):=KANJI(cx) + kanji_ivs*max_cjk_val + else + info(link(q)):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; last_jchr:=q; @z @@ -986,7 +1096,7 @@ char_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given; end; @y KANJI(cx):=cur_chr; -kanji,kana,other_kchar,hangul: cx:=cur_chr; +kanji,kana,other_kchar,hangul,modifier: cx:=cur_chr; kchar_given: KANJI(cx):=cur_chr; char_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=char_given; @@ -1002,7 +1112,10 @@ kchar_num: begin scan_char_num; cur_chr:=cur_val; cur_cmd:=kchar_given; math_kcode(p-1):=KANJI(cx); @y math_type(p):=math_jchar; fam(p):=cur_jfam; character(p):=qi(0); - math_kcode(p-1):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; + if (kcat_code(kcatcodekey(cx))=kanji)and(cx>=max_cjk_val) then + math_kcode(p-1):=KANJI(cx) + kanji_ivs*max_cjk_val + else + math_kcode(p-1):=KANJI(cx) + kcat_code(kcatcodekey(cx))*max_cjk_val; @z @x @@ -1023,7 +1136,7 @@ mmode+letter,mmode+other_char,mmode+char_given: if check_echar_range(cur_chr) then set_math_char(ho(math_code(cur_chr))) else set_math_kchar(cur_chr); -mmode+kanji,mmode+kana,mmode+other_kchar,mmode+hangul: begin +mmode+kanji,mmode+kana,mmode+other_kchar,mmode+hangul,mmode+modifier: begin cx:=cur_chr; set_math_kchar(KANJI(cx)); end; mmode+char_num: begin scan_char_num; cur_chr:=cur_val; @@ -1100,7 +1213,7 @@ kchar_given: begin print_esc("kchar"); print_hex(chr_code); if cur_chr=kcat_code_base then m:=kanji else m:=0 @y @ @<Let |m| be the minimal...@>= -if cur_chr=kcat_code_base then m:=not_cjk else m:=0 +if cur_chr=kcat_code_base then m:=latin_ucs else m:=0 @z @x @@ -1169,7 +1282,7 @@ if font_dir[font(p)]<>dir_default then @y @ @<Insert a space around the character |p|@>= if font_dir[font(p)]<>dir_default then - begin KANJI(cx):=info(link(p)) mod max_cjk_val; + begin KANJI(cx):=ktokentochr(info(link(p))); @z @x @@ -1177,7 +1290,7 @@ else if font_dir[font(first_char)]<>dir_default then begin KANJI(cx):=info(link(first_char)); @y else if font_dir[font(first_char)]<>dir_default then - begin KANJI(cx):=info(link(first_char)) mod max_cjk_val; + begin KANJI(cx):=ktokentochr(info(link(first_char))); @z @x @@ -1186,7 +1299,7 @@ else if font_dir[font(last_char)]<>dir_default then @y else if font_dir[font(last_char)]<>dir_default then begin insert_skip:=after_wchar; - KANJI(cx):=info(link(last_char)) mod max_cjk_val; + KANJI(cx):=ktokentochr(info(link(last_char))); @z @x @@ -1198,26 +1311,55 @@ begin if is_char_node(link(p)) then begin if is_char_node(link(p)) then begin q:=p; p:=link(p); if font_dir[font(p)]<>dir_default then - begin KANJI(cx):=info(link(p)) mod max_cjk_val; + begin KANJI(cx):=ktokentochr(info(link(p))); @z @x begin KANJI(cx):=info(link(p)); i:=kcat_code(kcatcodekey(cx)); k:=0; if (i=kanji)or(i=kana) then begin t:=q; s:=p; end; @y - begin KANJI(cx):=info(link(p)) mod max_cjk_val; - i:=info(link(p)) div max_cjk_val; k:=0; - if (i=kanji)or(i=kana)or(i=hangul) then begin t:=q; s:=p; end; + begin KANJI(cx):=ktokentochr(info(link(p))); + i:=ktokentocmd(info(link(p))); k:=0; + if (i=kanji)or(i=kana)or(i=hangul)or(i=modifier) then begin t:=q; s:=p; end; @z @x + begin if not disp_called then + begin prev_node:=tail; tail_append(get_node(small_node_size)); + type(tail):=disp_node; disp_dimen(tail):=0; disp_called:=true + end; + fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l; + link(tail):=main_p; tail:=main_p; last_jchr:=tail; fast_get_avail(main_p); info(main_p):=KANJI(cur_chr); @y + begin if (cur_cmd=modifier) then begin + KANJI(cx):=info(main_p) mod max_cjk_val; + if (UVScombinecode(cx,cur_chr)>0) then begin + cx:=UVScombinecode(cx,cur_chr); + if (kcat_code(kcatcodekey(KANJI(cx)))=kanji)and(cx>=max_cjk_val) then + info(main_p):=KANJI(cx)+kanji_ivs*max_cjk_val + else + info(main_p):=KANJI(cx)+kcat_code(kcatcodekey(KANJI(cx)))*max_cjk_val; + ins_kp:=false; + goto again_2 + end + end + end; + begin if not disp_called then + begin prev_node:=tail; tail_append(get_node(small_node_size)); + type(tail):=disp_node; disp_dimen(tail):=0; disp_called:=true + end; + fast_get_avail(main_p); font(main_p):=main_f; character(main_p):=cur_l; + link(tail):=main_p; tail:=main_p; last_jchr:=tail; fast_get_avail(main_p); - if (cur_cmd>=kanji)and(cur_cmd<=hangul) then + if (cur_cmd=kanji)and(cur_chr>=max_cjk_val) then + info(main_p):=KANJI(cur_chr)+kanji_ivs*max_cjk_val + else if (cur_cmd>=kanji)and(cur_cmd<=modifier) then info(main_p):=KANJI(cur_chr)+cur_cmd*max_cjk_val else if cur_cmd=not_cjk then info(main_p):=KANJI(cur_chr)+other_kchar*max_cjk_val + else if cur_cmd=latin_ucs then + info(main_p):=KANJI(cur_chr)+cat_code(cur_chr)*max_cjk_val else { Does this case occur? } info(main_p):=KANJI(cur_chr)+kcat_code(kcatcodekey(KANJI(cur_chr)))*max_cjk_val; @z @@ -1229,7 +1371,7 @@ begin if is_char_node(link(p)) then @y main_i:=orig_char_info(main_f)(cur_l); case cur_cmd of - kanji,kana,other_kchar,hangul: begin + kanji,kana,other_kchar,hangul,modifier: begin @z @x @@ -1248,7 +1390,7 @@ begin if is_char_node(link(p)) then else cur_l:=qi(get_jfm_pos(KANJI(cur_chr),main_f)); end; @y - kanji,kana,other_kchar,hangul: cur_l:=qi(get_jfm_pos(KANJI(cur_chr),main_f)); + kanji,kana,other_kchar,hangul,modifier: cur_l:=qi(get_jfm_pos(KANJI(cur_chr),main_f)); letter,other_char: begin ins_kp:=true; cur_l:=qi(0); end; char_given: begin if check_echar_range(cur_chr) then @@ -1282,17 +1424,37 @@ if s>@"FF then end else print_char(s); @y procedure print_kanji(@!s:KANJI_code); {prints a single character} +var @!v,@!nn,@!jj: integer; begin -s:=toBUFF(s mod max_cjk_val); -if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); -if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); -if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); - print_char(@"100+BYTE4(s)); +if (isinternalUPTEX) then begin + s:=ktokentochr(s); + s:=toUCS(s); + nn:=UVSgetcodepointlength(s); + jj:=1; + while jj<=nn do begin + v:=UVSgetcodepointinsequence(s,jj); + if (v>0) then begin + v:=UCStoUTF8(v); + if BYTE1(v)<>0 then print_char(@"100+BYTE1(v)); + if BYTE2(v)<>0 then print_char(@"100+BYTE2(v)); + if BYTE3(v)<>0 then print_char(@"100+BYTE3(v)); + print_char(@"100+BYTE4(v)); + end; + incr(jj); + end + end +else begin + s:=toBUFF(s mod max_cjk_val); + if BYTE1(s)<>0 then print_char(@"100+BYTE1(s)); + if BYTE2(s)<>0 then print_char(@"100+BYTE2(s)); + if BYTE3(s)<>0 then print_char(@"100+BYTE3(s)); + print_char(@"100+BYTE4(s)); + end; end; -function check_kcat_code(@!ct:integer):integer; +function check_kcat_code(@!ct:integer;@!cx:integer):integer; begin -if ((ct>=kanji)and(enable_cjk_token=0))or(enable_cjk_token=2)then +if (((ct>=kanji)or((ct=latin_ucs)and(cx<max_ucs_val)))and(enable_cjk_token=0))or(enable_cjk_token=2)then check_kcat_code:=1 else check_kcat_code:=0; end; diff --git a/Build/source/texk/web2c/uptexdir/uptex.defines b/Build/source/texk/web2c/uptexdir/uptex.defines index d9b4e341912..93176e5c244 100644 --- a/Build/source/texk/web2c/uptexdir/uptex.defines +++ b/Build/source/texk/web2c/uptexdir/uptex.defines @@ -31,11 +31,15 @@ @define function fputs2 (); @define function inputline2 (); @define function ptencconvfirstline (); +@define function UVScombinecode (); +@define function UVSgetcodepointlength (); +@define function UVSgetcodepointinsequence (); @define function fromJIS (); @define function fromEUC (); @define function fromSJIS (); @define function fromKUTEN (); +@define function UCStoUTF8 (); @define function fromUCS (); @define function toJIS (); @define function toUCS (); @@ -46,6 +50,8 @@ @define function ischarkanji (); @define function ismultiprn (); @define function calcpos (); +@define function ktokentocmd (); +@define function ktokentochr (); @define function kcatcodekey (); @define function multilenbuffchar (); @define function nrestmultichr (); diff --git a/Build/source/texk/web2c/uptexdir/uptex_version.h b/Build/source/texk/web2c/uptexdir/uptex_version.h index b660b46bbef..ba12256a091 100644 --- a/Build/source/texk/web2c/uptexdir/uptex_version.h +++ b/Build/source/texk/web2c/uptexdir/uptex_version.h @@ -1 +1 @@ -#define UPTEX_VERSION "u1.30" +#define UPTEX_VERSION "u1.35" diff --git a/Build/source/texk/web2c/uptexdir/uptftopl.ch b/Build/source/texk/web2c/uptexdir/uptftopl.ch index af21ffe429e..99398736ecd 100644 --- a/Build/source/texk/web2c/uptexdir/uptftopl.ch +++ b/Build/source/texk/web2c/uptexdir/uptftopl.ch @@ -1,5 +1,6 @@ % This is a change file for TFtoPL % +% (2024-04-27) TTK Support upTeX new encoding for combining characters % (2023-09-17) HY Support more than 256 different glue/kern % (2022-12-03) TTK Merge pTFtoPL source/binary into upTFtoPL % (2018-01-27) HY pTFtoPL p2.0 - new JFM spec by texjporg @@ -17,7 +18,7 @@ @d banner=='This is TFtoPL, Version 3.3' {printed when the program starts} @y @d my_name=='uptftopl' -@d banner=='This is upTFtoPL, Version 3.3-p230917' +@d banner=='This is upTFtoPL, Version 3.3-p240427' {printed when the program starts} @z @@ -406,7 +407,7 @@ incr(current_option); @* For Japanese Font Metric routines. % pTeX: We need to include some routines for handling kanji character. -@d max_kanji=1114111 {number of the kanji characters - 1} +@d max_kanji=@"2FFFFF {number of the kanji characters - 1} @<Glob...@>= @!this_code:integer; {to hold jis code of the current kanji character} @@ -489,7 +490,7 @@ for k:=@'40 to 255 do xchr[k]:=k; @ @<declare kanji conversion functions@>= procedure out_kanji(jis_code:integer); { prints a kanji character } -var @!cx:integer; {KANJI code} +var @!cx,@!v,@!nn,@!jj:integer; {KANJI code} i:0..5; {index of array} begin@/ if (charcode_format=charcode_octal)or(jis_code<128) then @@ -515,18 +516,36 @@ if (charcode_format=charcode_octal)or(jis_code<128) then end; end else begin - cx:=toBUFF(fromDVI(jis_code)); - if BYTE1(cx)<>0 then out(xchr[BYTE1(cx)]); - if BYTE2(cx)<>0 then out(xchr[BYTE2(cx)]); - if BYTE3(cx)<>0 then out(xchr[BYTE3(cx)]); - out(xchr[BYTE4(cx)]); + if (isinternalUPTEX) then begin + cx:=fromDVI(jis_code); + nn:=UVSgetcodepointlength(cx); + jj:=1; + while jj<=nn do begin + v:=UVSgetcodepointinsequence(cx,jj); + if (v>0) then begin + v:=UCStoUTF8(v); + if BYTE1(v)<>0 then out(xchr[BYTE1(v)]); + if BYTE2(v)<>0 then out(xchr[BYTE2(v)]); + if BYTE3(v)<>0 then out(xchr[BYTE3(v)]); + out(xchr[BYTE4(v)]); + end; + incr(jj); + end + end + else begin + cx:=toBUFF(fromDVI(jis_code)); + if BYTE1(cx)<>0 then out(xchr[BYTE1(cx)]); + if BYTE2(cx)<>0 then out(xchr[BYTE2(cx)]); + if BYTE3(cx)<>0 then out(xchr[BYTE3(cx)]); + out(xchr[BYTE4(cx)]); + end; end; end; @ @<declare kanji conversion functions@>= function valid_jis_code(cx:integer):boolean; begin valid_jis_code:=true; -if (cx>@"10FFFF)or(not is_char_kanji(fromDVI(cx))) +if (cx>max_kanji)or(not is_char_kanji(fromDVI(cx))) or(toDVI(fromDVI(cx))<>cx) then valid_jis_code:=false; end; |