3 # generate list of wide characters, with convex closure
7 if [ ! -r EastAsianWidth.txt
]
8 then ln -s /usr
/share
/unicode
/ucd
/EastAsianWidth.txt . ||
exit 1
10 if [ ! -r UnicodeData.txt
]
11 then ln -s /usr
/share
/unicode
/ucd
/UnicodeData.txt . ||
exit 1
13 if [ ! -r Blocks.txt
]
14 then ln -s /usr
/share
/unicode
/ucd
/Blocks.txt . ||
exit 1
17 sed -e "s,^\([^;]*\);[NAH],\1," -e t
-e d EastAsianWidth.txt
> wide.na
18 sed -e "s,^\([^;]*\);[WF],\1," -e t
-e d EastAsianWidth.txt
> wide.fw
20 PATH
="$PATH:." # for uniset
22 nrfw
=`uniset +wide.fw nr | sed -e 's,.*:,,'`
24 nrna
=`uniset +wide.na nr | sed -e 's,.*:,,'`
27 extrablocks
="2E80-303E"
31 nr
=`uniset +wide.$2 -$1 nr | sed -e 's,.*:,,'`
34 echo "adding compact closure of wide ranges, this may take ~10min"
35 for b
in $extrablocks `sed -e 's,^\([0-9A-F]*\)\.\.\([0-9A-F]*\).*,\1-\2,' -e t -e d Blocks.txt`
37 echo checking
$range $
* >&2
38 if includes
$range fw
$nrfw && ! includes
$range na
$nrna
44 sed -e "s,^,//," -e 1q EastAsianWidth.txt
45 sed -e "s,^,//," -e 1q Blocks.txt
46 uniset
`sed -e 's,^,+,' wide.blocks` +wide.fw c
49 rm -f wide.na wide.fw wide.blocks