git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
latin: rename Tap simplified to Short Tap
[sheet.git]
/
writing-latn.inc.pl
diff --git
a/writing-latn.inc.pl
b/writing-latn.inc.pl
index ed8466df95ec16d11edd5a699ac06be251554be7..4186f183721cd95fbd66c12d6dbfe61d95dfd754 100644
(file)
--- a/
writing-latn.inc.pl
+++ b/
writing-latn.inc.pl
@@
-4,7
+4,7
@@
use List::Util qw( pairs );
sub disptap {
return map {
!m/\A(-?)(\d)(\d)/ ? $_ :
sub disptap {
return map {
!m/\A(-?)(\d)(\d)/ ? $_ :
- $1.
sprintf('%s<br>%s
',
+ $1.
join('
',
'·' x $2, '·' x $3,
);
} @_;
'·' x $2, '·' x $3,
);
} @_;
@@
-48,14
+48,21
@@
my $U = 0; # optional unicode alternatives
],
'Sutton <abbr title="American Sign Lanugage">ASL</abbr>' => [
# American manual alphabet in Sutton (U+1D800+) notation
],
'Sutton <abbr title="American Sign Lanugage">ASL</abbr>' => [
# American manual alphabet in Sutton (U+1D800+) notation
- map { pack 'W*', map { hex "1D$_" } unpack '(A3)*', $_ } qw{
+ map {
!!$_ &&
pack 'W*', map { hex "1D$_" } unpack '(A3)*', $_ } qw{
8F7a9c 847a9c 86Da9c 801a9c 84Aa9c
8CEa9c 8F0 815aa2 892a9c 892a9c9A2aac
840a9c 8DCa9c 88Da9c
819a9c 876a9c 840a9caA1 8F0a9caA1 81Aa9c
903a9c 8FBa9c 815a9c 80Ea9c 887a9c
806a9c 89Aa9c 800a9c945aaa
8F7a9c 847a9c 86Da9c 801a9c 84Aa9c
8CEa9c 8F0 815aa2 892a9c 892a9c9A2aac
840a9c 8DCa9c 88Da9c
819a9c 876a9c 840a9caA1 8F0a9caA1 81Aa9c
903a9c 8FBa9c 815a9c 80Ea9c 887a9c
806a9c 89Aa9c 800a9c945aaa
+ 0 965aa6
}],
}],
+'<abbr title="International Telegraph Alphabet">ITA</abbr>2' => [
+ map { tr/01/○●/r =~ s/..\K/ /r } qw(
+ 11000 10011 01110 10010 10000 10110 01011 00101 01100 11010 11110 01001 00111
+ 00110 00011 01101 11101 01010 10100 00001 11100 01111 11001 10111 10101 10001
+ 00100
+)],
'Braille' => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }],
'5-point Tactile' => [
map { '<svg width="9" height="12" viewBox="0 0 18 24">'.$_.'</svg>' }
'Braille' => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }],
'5-point Tactile' => [
map { '<svg width="9" height="12" viewBox="0 0 18 24">'.$_.'</svg>' }
@@
-80,13
+87,17
@@
my $U = 0; # optional unicode alternatives
11 12 13 14 15 21 22 23 > 24 25 31 32
33 34 35 41 42 43 44 45 51 52 53 54 55
})],
11 12 13 14 15 21 22 23 > 24 25 31 32
33 34 35 41 42 43 44 45 51 52 53 54 55
})],
-'
Tap simplified
' => [disptap(qw{
+'
Short Tap
' => [disptap(qw{
11 12 13 14 21 22 23 20 > 31 -13 32 33
30 41 42 -13 43 40 10 51 52 53 50 -31 -40
})],
11 12 13 14 21 22 23 20 > 31 -13 32 33
30 41 42 -13 43 40 10 51 52 53 50 -31 -40
})],
+'Cards' => [(
+ map { chr(0x1F0A0 + $_), sprintf('<b>%s</b>', chr(0x1F0B0 + $_)) } # spades, hearts
+ 1 .. 11, 13, 14 # A 2-10 J Q K
+), '', chr(0x1F0CF), chr(0x1F0DF) ],
'Maritime flags' => [
# International Code of Signals, SVG fills
'Maritime flags' => [
# International Code of Signals, SVG fills
- map { '<svg width="20" height="20" viewBox="0 0 30 30">'.s/\n?\t+//gr.'</svg>' }
+ map {
!!$_ &&
'<svg width="20" height="20" viewBox="0 0 30 30">'.s/\n?\t+//gr.'</svg>' }
split /\n\n/, qq{
<path fill="$C{blue}" d="M0,0 h30 l-7.5,15 7.5,15 h-30 z"/>
<path fill="white" d="M0,0 h15 v30 h-15"/>
split /\n\n/, qq{
<path fill="$C{blue}" d="M0,0 h30 l-7.5,15 7.5,15 h-30 z"/>
<path fill="white" d="M0,0 h15 v30 h-15"/>
@@
-178,12
+189,20
@@
my $U = 0; # optional unicode alternatives
<path fill="$C{blue}" d="M30,0 v31 l-15,-15"/>
<path fill="$C{yellow}" d="M0,0 h31 l-15,15"/>
<path fill="$C{red}" d="M0,30 h31 l-15,-15"/>
<path fill="$C{blue}" d="M30,0 v31 l-15,-15"/>
<path fill="$C{yellow}" d="M0,0 h31 l-15,15"/>
<path fill="$C{red}" d="M0,30 h31 l-15,-15"/>
+
+
+
+ <path fill="$C{blue}" d="M0,5 30,15 0,25"/>
+ <path fill="$C{yellow}" d="M0,9 20,15 0,21"/>
+
+ <path fill="$C{blue}" d="M0,5 30,15 0,25"/>
+ <path fill="white" d="M15,10 30,15 15,20"/>
},
],
'Flag semaphore' => [
map {
local $_ = $_;
},
],
'Flag semaphore' => [
map {
local $_ = $_;
- s/[1-4]\K(?=[4-9])/ /;
+ s/[1-4]\K(?=[4-9])/ /;
# prevent unwanted vertical crossing
tr/1-9/↙←↖↑↗→↘↓/;
s{(\S)(?=.)}{<span style="position:absolute">$1</span>};
$_
tr/1-9/↙←↖↑↗→↘↓/;
s{(\S)(?=.)}{<span style="position:absolute">$1</span>};
$_
@@
-198,7
+217,7
@@
my $U = 0; # optional unicode alternatives
my ($r, $pr, $pl) = split //, $_;
/^\D$/ ? $_ : sprintf(
join('',
my ($r, $pr, $pl) = split //, $_;
/^\D$/ ? $_ : sprintf(
join('',
- '<svg width="
20
" height="20" viewBox="0 0 10 15">',
+ '<svg width="
16
" height="20" viewBox="0 0 10 15">',
'<path d="M5,6 v7"/>',
'<path d="M0,%s h10 %s" transform="rotate(%d 5 6)"/>',
'</svg>',
'<path d="M5,6 v7"/>',
'<path d="M0,%s h10 %s" transform="rotate(%d 5 6)"/>',
'</svg>',
@@
-218,7
+237,7
@@
my $U = 0; # optional unicode alternatives
'Prussian semaphore' => [
map { /^\D+$/ ? $_ : sprintf
join('',
'Prussian semaphore' => [
map { /^\D+$/ ? $_ : sprintf
join('',
- '<svg width="
2
0" height="20" viewBox="0 0 8 18">',
+ '<svg width="
1
0" height="20" viewBox="0 0 8 18">',
'<path d="M4,1 v18"/>',
(map {(
qq(<path d="M0 $_ h4" transform="rotate(%d 4 $_)"/>),
'<path d="M4,1 v18"/>',
(map {(
qq(<path d="M0 $_ h4" transform="rotate(%d 4 $_)"/>),
@@
-237,10
+256,12
@@
my $U = 0; # optional unicode alternatives
],
'Code 39' => [
# ISO/IEC 16388
],
'Code 39' => [
# ISO/IEC 16388
- map { tr/012/ ❘❙/r } qw(
+ map { !!$_ && tr/012/ ❘❙/r }
+ # bar widths (1-2) followed by space of width 1 (implied) or 2 (0)
+ qw(
211012 121012 221011 112012 212011 122011 111022 211021 121021 112021
211102 121102 221101 112102 212101 122101 111202 211201 121201 112201
211012 121012 221011 112012 212011 122011 111022 211021 121021 112021
211102 121102 221101 112102 212101 122101 111202 211201 121201 112201
- 201112 102112 202111 101212 201211 102211
+ 201112 102112 202111 101212 201211 102211
102121 0 101221
)
],
'Code 93' => [
)
],
'Code 93' => [
@@
-258,24
+279,25
@@
my $U = 0; # optional unicode alternatives
qw(
21111 21121 21131 22111 22121 23111 11211 11221 11231
12211 13211 11112 11122 11132 12112 13112 21211 21221
qw(
21111 21121 21131 22111 22121 23111 11211 11221 11231
12211 13211 11112 11122 11132 12112 13112 21211 21221
- 21112 21122 22112 22211 11212 11222 12212 12311
+ 21112 21122 22112 22211 11212 11222 12212 12311
31121
)
],
'Code 128' => [
map { $U ? tr/1-3-/❘❙❚ /r : sprintf
)
],
'Code 128' => [
map { $U ? tr/1-3-/❘❙❚ /r : sprintf
- '<svg width="2
0" height="14" viewBox="-.5 0 10
7"><path d="M0,0 %s"/></svg>',
+ '<svg width="2
2" height="14" viewBox="-.5 0 11
7"><path d="M0,0 %s"/></svg>',
join ' ',
map {
$_ eq '' ? 'm2,-7' :
join ' ',
map {
$_ eq '' ? 'm2,-7' :
- $_ eq '-' ? 'm4,-7' :
+ $_ eq '.' ? 'm3,-7' :
+ $_ eq ':' ? 'm4,-7' :
join 'm1,-7', ('v7') x $_
}
join 'm1,-7', ('v7') x $_
}
- split /(
-)?/, $_ # each bar [123] and space [ -
]
+ split /(
[.:])?/ # each bar [123] and space [ .:
]
}
}
- # bar widths (1-3) followed by space of width 1 (implied)
or 3 (-
)
+ # bar widths (1-3) followed by space of width 1 (implied)
, 2 (.) or 3 (:
)
qw(
qw(
- 11
-2 1-12 1-1-2 12-1 1-21 1-2-1 21-1 2-11 2-1-1 123 12-3 1-
23 132
- 13
-2 1-32 332 21-3 2-13 231 23-1 233 312 31-2 3-12 321 32-1
+ 11
:2 1:12 1:1:2 12:1 1:21 1:2:1 21:1 2:11 2:1:1 123 12:3 1:
23 132
+ 13
:2 1:32 332 21:3 2:13 231 23:1 233 312 31:2 3:12 321 32:1 22.2
)
],
'<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
)
],
'<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
@@
-287,7
+309,7
@@
my $U = 0; # optional unicode alternatives
($_ & 1 ? 0 : 2), 2 + ($_ & 2) + ($_ & 1) * 2,
($_ & 1 ? 0 : 2) + 2 + ($_ & 2) + ($_ & 1) * 2,
}
($_ & 1 ? 0 : 2), 2 + ($_ & 2) + ($_ & 1) * 2,
($_ & 1 ? 0 : 2) + 2 + ($_ & 2) + ($_ & 1) * 2,
}
- split //
, $_
+ split //
}
qw(
2121 2301
}
qw(
2121 2301
@@
-295,7
+317,8
@@
my $U = 0; # optional unicode alternatives
1023 1203 1221 3003 3021 3201
1032 1212 1230 3012 3030 3210
1122 1302 1320 3102 3120 3300
1023 1203 1221 3003 3021 3201
1032 1212 1230 3012 3030 3210
1122 1302 1320 3102 3120 3300
- )
+ 0033
+ ) # 0 for space
],
'Pigpen' => [
map {
],
'Pigpen' => [
map {
@@
-326,24
+349,27
@@
my $U = 0; # optional unicode alternatives
. '<path d="M0,0%s %s4,0 %s4,4 %s0,4 %s0,0"/></svg>',
'h.5v.5h-.5v-.5', # start anchor
map { ['M', 'h0M', 'L']->[$_] }
. '<path d="M0,0%s %s4,0 %s4,4 %s0,4 %s0,0"/></svg>',
'h.5v.5h-.5v-.5', # start anchor
map { ['M', 'h0M', 'L']->[$_] }
- split //
, $_
+ split //
}
# draw style (0=empty, 1=dot, 2=line connect) to right, down, left, up
qw(
0010 0112 2022 2220 2000 2012 0122 0202 0020 0220 0012 0022 2202
}
# draw style (0=empty, 1=dot, 2=line connect) to right, down, left, up
qw(
0010 0112 2022 2220 2000 2012 0122 0202 0020 0220 0012 0022 2202
- 0222 2222 0102 0200 2201 2002 2200 0100 0110 0120 2001 2010 2020
+ 0222 2222 0102 0200 2201 2002 2200 0100 0110 0120 2001 2010 2020
0
),
],
'Chromacons' => [
# Colour Alphabet by Paul Green-Armytage (2010)
),
],
'Chromacons' => [
# Colour Alphabet by Paul Green-Armytage (2010)
- map { sprintf '<span style="background:#%s" title="%s">%s</span>', split(/:/, $_), chr(8195) }
+ map {
+ sprintf !$_ ? '<span>%2$s</span>' : '<span style="background:#%s" title="%s">%s</span>',
+ split(/:/), chr(8195);
+ }
qw{
F0A3FF:Amethyst 0075DC:Blue 993F00:Caramel 4C005C:Damson 191919:Ebony
005C31:Forest 2BCE48:Green FFCC99:Honeydew 808080:Iron 94FFB5:Jade
8F7C00:Khaki 9DCC00:Lime C20088:Mallow
003380:Navy FFA405:Orpiment FFA8BB:Pink 426600:Quagmire FF0010:Red
5EF1F2:Sky 00998F:Turquoise E0FF66:Uranium 740AFF:Violet 990000:Wine
qw{
F0A3FF:Amethyst 0075DC:Blue 993F00:Caramel 4C005C:Damson 191919:Ebony
005C31:Forest 2BCE48:Green FFCC99:Honeydew 808080:Iron 94FFB5:Jade
8F7C00:Khaki 9DCC00:Lime C20088:Mallow
003380:Navy FFA405:Orpiment FFA8BB:Pink 426600:Quagmire FF0010:Red
5EF1F2:Sky 00998F:Turquoise E0FF66:Uranium 740AFF:Violet 990000:Wine
- FFFF80:Xanthin FFFF00:Yellow FF5005:Zinnia
- }
,
+ FFFF80:Xanthin FFFF00:Yellow FF5005:Zinnia
0
+ }
],
);
],
);