-
Notifications
You must be signed in to change notification settings - Fork 0
/
fonts.go
81 lines (75 loc) · 2.82 KB
/
fonts.go
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package main
// © 2021 John Lenton
// MIT licensed.
// from https://github.com/chipaca/goctest
type font struct {
numerals [10][]string
percent []string
passed []string
tests []string
run []string
space string
}
var fonts = struct {
braille, future, boring, double font
}{
// based on the 'smbraille' toilet font by Sam Hocevar <[email protected]>
// BUT, added a % sign, and made the numerals be text figures.
braille: font{
numerals: [10][]string{
{" ⡔⣢", " ⠫⠜"},
{" ⢴ ", " ⠼⠄"},
{" ⠔⢢", " ⠮⠤"},
{" ⠒⢲", " ⣈⡱"},
{" ⢀⢴", " ⠉⢹"},
{" ⡖⠒", " ⣉⡱"},
{" ⣎⡁", " ⠣⠜"},
{" ⠒⢲", " ⢰⠁"},
{" ⢎⡱", " ⠣⠜"},
{" ⡔⢢", " ⢈⡹"},
},
percent: []string{" ⠶⡜", " ⡜⠶"},
passed: []string{" ⣀⡀ ⢀⣀ ⢀⣀ ⢀⣀ ⢀⡀ ⢀⣸ ", " ⡧⠜ ⠣⠼ ⠭⠕ ⠭⠕ ⠣⠭ ⠣⠼ ⠶"},
tests: []string{" ⣰⡀ ⢀⡀ ⢀⣀ ⣰⡀ ⢀⣀", " ⠘⠤ ⠣⠭ ⠭⠕ ⠘⠤ ⠭⠕"},
run: []string{" ⡀⣀ ⡀⢀ ⣀⡀ ", " ⠏ ⠣⠼ ⠇⠸ ⠶"},
space: " ",
},
// based on the 'future' toilet font by Sam Hocevar <[email protected]>
future: font{
numerals: [10][]string{
{"┏━┓", "┃┃┃", "┗━┛"},
{"╺┓ ", " ┃ ", "╺┻╸"},
{"┏━┓", "┏━┛", "┗━╸"},
{"┏━┓", "╺━┫", "┗━┛"},
{"╻ ╻", "┗━┫", " ╹"},
{"┏━╸", "┗━┓", "┗━┛"},
{"┏━┓", "┣━┓", "┗━┛"},
{"┏━┓", " ┃", " ╹"},
{"┏━┓", "┣━┫", "┗━┛"},
{"┏━┓", "┗━┫", "┗━┛"},
},
percent: []string{"┏┓╻", "┏━┛", "╹┗┛"},
passed: []string{"┏━┓┏━┓┏━┓┏━┓┏━╸╺┳┓ ", "┣━┛┣━┫┗━┓┗━┓┣╸ ┃┃ ", "╹ ╹ ╹┗━┛┗━┛┗━╸╺┻┛╹"},
tests: []string{"╺┳╸┏━╸┏━┓╺┳╸┏━┓", " ┃ ┣╸ ┗━┓ ┃ ┗━┓", " ╹ ┗━╸┗━┛ ╹ ┗━┛"},
run: []string{"┏━┓╻ ╻┏┓╻ ", "┣┳┛┃ ┃┃┗┫ ", "╹┗╸┗━┛╹ ╹╹"},
space: " ",
},
// boring old not-really-a-font, mostly for testing (or boring people)
boring: font{
numerals: [10][]string{{"0"}, {"1"}, {"2"}, {"3"}, {"4"}, {"5"}, {"6"}, {"7"}, {"8"}, {"9"}},
percent: []string{"%"},
passed: []string{"passed."},
tests: []string{"tests"},
run: []string{"run."},
space: " ",
},
// double-width characters. Used ‘unifonter’ for this one.
double: font{
numerals: [10][]string{{"0"}, {"1"}, {"2"}, {"3"}, {"4"}, {"5"}, {"6"}, {"7"}, {"8"}, {"9"}},
percent: []string{"%"},
passed: []string{"passed."},
tests: []string{"tests"},
run: []string{"run."},
space: " ",
},
}