Doug Coleman 2019-07-28 13:38:42 -05:00
parent bc999a84e6
commit 5a49cb20cf
2 changed files with 17 additions and 522 deletions

View File

@ -60,8 +60,6 @@ IN: unicode.collation.tests
{ +lt+ } [ { 4019 98 } { 4019 3953 1 3968 97 } [ >string ] bi@ string<=> ] unit-test
{ +lt+ } [ { 4018 820 3969 } { 3959 33 } [ >string ] bi@ string<=> ] unit-test
{ +lt+ } [ { 4019 3953 820 3968 } { 3961 33 } [ >string ] bi@ string<=> ] unit-test
{ +lt+ } [ { 111355 98 } { 19968 33 } [ >string ] bi@ string<=> ] unit-test
{ +lt+ } [ { 40943 98 } { 64014 33 } [ >string ] bi@ string<=> ] unit-test
{ { 12748 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } }
@ -88,395 +86,5 @@ IN: unicode.collation.tests
{ { 12750 12741 0 32 74 32 0 2 2 2 0 65535 65535 65535 } }
[ { 4019 3953 820 3968 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 0 32 0 2 0 65535 614 } }
[ { 110960 33 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 0 32 0 2 0 65535 620 } }
[ { 110960 63 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 0 32 74 0 2 2 0 65535 65535 } }
[ { 110960 820 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 110960 97 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 110960 65 } >string collation-key/nfd drop ] unit-test
{ { 64257 32768 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 110960 98 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 0 32 0 2 0 65535 614 } }
[ { 110961 33 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 0 32 0 2 0 65535 620 } }
[ { 110961 63 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 0 32 74 0 2 2 0 65535 65535 } }
[ { 110961 820 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 110961 97 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 110961 65 } >string collation-key/nfd drop ] unit-test
{ { 64257 32769 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 110961 98 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 0 32 0 2 0 65535 614 } }
[ { 110962 33 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 0 32 0 2 0 65535 620 } }
[ { 110962 63 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 0 32 74 0 2 2 0 65535 65535 } }
[ { 110962 820 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 110962 97 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 110962 65 } >string collation-key/nfd drop ] unit-test
{ { 64257 32770 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 110962 98 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 0 32 0 2 0 65535 614 } }
[ { 110963 33 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 0 32 0 2 0 65535 620 } }
[ { 110963 63 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 0 32 74 0 2 2 0 65535 65535 } }
[ { 110963 820 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 110963 97 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 110963 65 } >string collation-key/nfd drop ] unit-test
{ { 64257 32771 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 110963 98 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 0 32 0 2 0 65535 614 } }
[ { 111355 33 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 0 32 0 2 0 65535 620 } }
[ { 111355 63 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 0 32 74 0 2 2 0 65535 65535 } }
[ { 111355 820 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 111355 97 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 111355 65 } >string collation-key/nfd drop ] unit-test
{ { 64257 33163 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 111355 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40934 0 32 0 2 0 65535 614 } }
[ { 40934 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40934 0 32 0 2 0 65535 620 } }
[ { 40934 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40934 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40934 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40934 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40934 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40934 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40934 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40935 0 32 0 2 0 65535 614 } }
[ { 40935 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40935 0 32 0 2 0 65535 620 } }
[ { 40935 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40935 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40935 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40935 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40935 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40935 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40935 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40936 0 32 0 2 0 65535 614 } }
[ { 40936 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40936 0 32 0 2 0 65535 620 } }
[ { 40936 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40936 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40936 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40936 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40936 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40936 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40936 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40937 0 32 0 2 0 65535 614 } }
[ { 40937 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40937 0 32 0 2 0 65535 620 } }
[ { 40937 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40937 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40937 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40937 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40937 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40937 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40937 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40938 0 32 0 2 0 65535 614 } }
[ { 40938 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40938 0 32 0 2 0 65535 620 } }
[ { 40938 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40938 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40938 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40938 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40938 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40938 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40938 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40939 0 32 0 2 0 65535 614 } }
[ { 40939 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40939 0 32 0 2 0 65535 620 } }
[ { 40939 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40939 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40939 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40939 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40939 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40939 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40939 98 } >string collation-key/nfd drop ] unit-test
{ { 64321 40943 0 32 0 2 0 65535 614 } }
[ { 40943 33 } >string collation-key/nfd drop ] unit-test
{ { 64321 40943 0 32 0 2 0 65535 620 } }
[ { 40943 63 } >string collation-key/nfd drop ] unit-test
{ { 64321 40943 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 40943 97 } >string collation-key/nfd drop ] unit-test
{ { 64321 40943 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 40943 65 } >string collation-key/nfd drop ] unit-test
{ { 64321 40943 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 40943 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 0 32 0 2 0 65535 614 } }
[ { 183984 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 0 32 0 2 0 65535 620 } }
[ { 183984 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 0 32 74 0 2 2 0 65535 65535 } }
[ { 183984 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183984 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183984 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52912 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183984 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 0 32 0 2 0 65535 614 } }
[ { 183985 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 0 32 0 2 0 65535 620 } }
[ { 183985 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 0 32 74 0 2 2 0 65535 65535 } }
[ { 183985 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183985 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183985 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52913 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183985 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 0 32 0 2 0 65535 614 } }
[ { 183986 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 0 32 0 2 0 65535 620 } }
[ { 183986 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 0 32 74 0 2 2 0 65535 65535 } }
[ { 183986 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183986 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183986 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52914 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183986 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 0 32 0 2 0 65535 614 } }
[ { 183987 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 0 32 0 2 0 65535 620 } }
[ { 183987 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 0 32 74 0 2 2 0 65535 65535 } }
[ { 183987 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183987 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183987 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52915 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183987 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 0 32 0 2 0 65535 614 } }
[ { 183988 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 0 32 0 2 0 65535 620 } }
[ { 183988 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 0 32 74 0 2 2 0 65535 65535 } }
[ { 183988 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183988 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183988 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52916 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183988 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 0 32 0 2 0 65535 614 } }
[ { 183989 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 0 32 0 2 0 65535 620 } }
[ { 183989 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 0 32 74 0 2 2 0 65535 65535 } }
[ { 183989 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 183989 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 183989 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 52917 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 183989 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 0 32 0 2 0 65535 614 } }
[ { 191452 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 0 32 0 2 0 65535 620 } }
[ { 191452 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 0 32 74 0 2 2 0 65535 65535 } }
[ { 191452 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 191452 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 191452 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 60380 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 191452 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 0 32 0 2 0 65535 614 } }
[ { 191453 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 0 32 0 2 0 65535 620 } }
[ { 191453 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 0 32 74 0 2 2 0 65535 65535 } }
[ { 191453 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 191453 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 191453 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 60381 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 191453 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 0 32 0 2 0 65535 614 } }
[ { 191454 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 0 32 0 2 0 65535 620 } }
[ { 191454 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 0 32 74 0 2 2 0 65535 65535 } }
[ { 191454 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 191454 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 191454 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 60382 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 191454 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 0 32 0 2 0 65535 614 } }
[ { 191455 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 0 32 0 2 0 65535 620 } }
[ { 191455 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 0 32 74 0 2 2 0 65535 65535 } }
[ { 191455 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 191455 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 191455 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 60383 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 191455 98 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 0 32 0 2 0 65535 614 } }
[ { 191456 33 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 0 32 0 2 0 65535 620 } }
[ { 191456 63 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 0 32 74 0 2 2 0 65535 65535 } }
[ { 191456 820 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 7817 0 32 32 0 2 2 0 65535 65535 } }
[ { 191456 97 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 7817 0 32 32 0 2 8 0 65535 65535 } }
[ { 191456 65 } >string collation-key/nfd drop ] unit-test
{ { 64389 60384 7843 0 32 32 0 2 2 0 65535 65535 } }
[ { 191456 98 } >string collation-key/nfd drop ] unit-test
{ { 12722 12741 12744 7817 0 32 32 32 32 0 2 2 2 2 0 65535 65535 65535 65535 } }
[ { 4019 3953 1 3968 97 } >string collation-key/nfd drop ] unit-test

View File

@ -72,128 +72,6 @@ TUPLE: weight-levels primary secondary tertiary ignorable? ;
}
}
}
! FIXME: WRONG WEIGHTS
{
{ 0x0FB2 0x0F71 0x0F72 } ! CE(0FB2) CE(0F71 0F72)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB2 0x0F73 } ! CE(0FB2) CE(0F71 0F72)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB2 0x0F71 0x0F74 } ! CE(0FB2) CE(0F71 0F74)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB2 0x0F75 } ! CE(0FB2) CE(0F71 0F74)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB3 0x0F71 0x0F72 } ! CE(0FB3) CE(0F71 0F72)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB3 0x0F73 } ! CE(0FB3) CE(0F71 0F72)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB3 0x0F71 0x0F74 } ! CE(0FB3) CE(0F71 0F74)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
{
{ 0x0FB3 0x0F75 } ! CE(0FB3) CE(0F71 0F74)
{
T{ weight-levels
{ primary 12719 }
{ secondary 32 }
{ tertiary 2 }
}
T{ weight-levels
{ primary 12741 }
{ secondary 32 }
{ tertiary 2 }
}
}
}
} ducet get-global '[ swap >string _ set-at ] assoc-each ;
! Add a few missing ducet values
@ -203,6 +81,9 @@ fixup-ducet
! Tangut Block, Tangut Components Block
{ [ 0x17000 0x187FF between? ] [ 0x18800 0x18AFF between? ] } 1|| ; inline
: nushu-block? ( char -- ? )
0x1b170 0x1B2FB between? ; inline
! https://wiki.computercraft.cc/Module:Unicode_data
! Unicode TR10 - Computing Implicit Weights
: base ( char -- base )
@ -213,7 +94,7 @@ fixup-ducet
{ [ dup 0x2B740 0x2B81D between? ] [ drop 0xFB80 ] } ! Extension D
{ [ dup 0x2B820 0x2CEA1 between? ] [ drop 0xFB80 ] } ! Extension E
{ [ dup 0x2CEB0 0x2EBE0 between? ] [ drop 0xFB80 ] } ! Extension F
{ [ dup 0x04E00 0x09FD5 between? ] [ drop 0xFB40 ] } ! CJK
{ [ dup 0x04E00 0x09FEF between? ] [ drop 0xFB40 ] } ! CJK
[ drop 0xFBC0 ] ! Other
} cond ;
@ -223,6 +104,12 @@ fixup-ducet
: tangut-BBBB ( char -- weight-levels )
0x17000 - 0x8000 bitor 0 0 <weight-levels> ; inline
: nushu-AAAA ( char -- weight-levels )
drop 0xfb01 0x0020 0x0002 <weight-levels> ; inline
: nushu-BBBB ( char -- weight-levels )
0x1B170 - 0x8000 bitor 0 0 <weight-levels> ; inline
: AAAA ( char -- weight-levels )
[ base ] [ -15 shift ] bi + 0x0020 0x0002 <weight-levels> ; inline
@ -231,11 +118,11 @@ fixup-ducet
: derive-weight ( 1string -- weight-levels-pair )
first
dup tangut-block? [
[ tangut-AAAA ] [ tangut-BBBB ] bi 2array
] [
[ AAAA ] [ BBBB ] bi 2array
] if ;
{
{ [ dup tangut-block? ] [ [ tangut-AAAA ] [ tangut-BBBB ] bi 2array ] }
{ [ dup nushu-block? ] [ [ nushu-AAAA ] [ nushu-BBBB ] bi 2array ] }
[ [ AAAA ] [ BBBB ] bi 2array ]
} cond ;
: building-last ( -- char )
building get [ 0 ] [ last last ] if-empty ;