-
Notifications
You must be signed in to change notification settings - Fork 0
/
contourChars.tcl
57 lines (57 loc) · 1.37 KB
/
contourChars.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#csvContour
#contourChars.tcl
##===================================================================
# Copyright (c) 2020 Yuji SODE <yuji.sode@gmail.com>
#
# This software is released under the MIT License.
# See LICENSE or http://opensource.org/licenses/mit-license.php
##===================================================================
#Characters list to text contour mapping
#--------------------------------------------------------------------
#
#=== Synopsis ===
# - `contourChars;`
# procedure that returns a characters list for array to text contour mapping
##===================================================================
#
#procedure that returns a characters list for array to text contour mapping
proc contourChars {} {
#
#rule array
array set rules {};
#
#-----------------------------------------
#right down neighborhood: c0 and c1 to c3
# [c0|c1]
# [c2|c3]
#
#v_i = {$c0!=$c_i?1:0}, and i = 1, 2 and 3
#rule: $rules(${v_1}${v_2}${v_3})
#-----------------------------------------
#
#U+287c: "⡼"
set rules(111) \u287c;
#
#U+285c: "⡜";
set rules(110) \u285c;
#
#U+2838: "⠸";
set rules(101) \u2838;
#
#U+2818: "⠘";
set rules(100) \u2818;
#
#U+2864: "⡤";
set rules(011) \u2864;
#
#U+2844: "⡄";
set rules(010) \u2844;
#
#U+2820: "⠠";
set rules(001) \u2820;
#
#U+2800: "⠀";
set rules(000) \u2800;
#
return [array get rules];
};