X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/3f794dd1016611b2972115a97624b41e1dd56a6c..36cc824ce76ec496c1eecfa33d2d3c8957e84951:/writing-latn.inc.pl?ds=sidebyside
diff --git a/writing-latn.inc.pl b/writing-latn.inc.pl
index 2a20b76..1666c6b 100644
--- a/writing-latn.inc.pl
+++ b/writing-latn.inc.pl
@@ -3,9 +3,9 @@ use utf8;
sub disptap {
return map {
m/\A(-?)(\d)(\d)/;
- sprintf('%s ',
- #TODO: prepend $1
- join "
\n", 'â¢' x $2, 'â¢' x $3,
+ sprintf('
%s %s | ',
+ ' class=ex' x !!$1,
+ '·' x $2, '·' x $3,
);
} @_;
}
@@ -13,10 +13,11 @@ sub disptap {
my %C = qw(red #EC1C24 blue #3953A3 yellow #F9EC31 black #231F20);
(
-latnuc => [qw{ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z }],
-latnlc => [qw{ a b c d e f g h i j k l m n o p q r s t u v w x y z }],
-latfsuet => [qw{ a b c d e f g h i j k l m n o p q r Å¿âs t u v w x y z }],
-asl => [
+'Uppercase' => [qw{ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z }],
+'Lowercase' => [qw{ a b c d e f g h i j k l m n o p q r s t u v w x y z }],
+'Sütterlin' => [qw{ a b c d e f g h i j k l m n o p q r Å¿âs t u v w x y z }],
+'Sutton ASL' => [
+ # American manual alphabet in Sutton (U+1D800+) notation
map { pack 'W*', map { hex "1D$_" } unpack '(A3)*', $_ } qw{
8F7a9c 847a9c 86Da9c 801a9c 84Aa9c
8CEa9c 8F0 815aa2 892a9c 892a9c9A2aac
@@ -25,20 +26,21 @@ asl => [
903a9c 8FBa9c 815a9c 80Ea9c 887a9c
806a9c 89Aa9c 800a9c945aaa
}],
-brai => [qw{ â â â â â â â â â â â
â â â â â â â â â â ¥ â § â º â â ½ â µ }],
-morse => [map {tr/.-/â§â/r} qw{
- .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. --
- -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..
- }],
-tap => [disptap(qw{
- 11 12 13 14 15 21 22 23 24 -24 25 31 32
- 33 34 35 41 42 43 44 45 51 52 53 54 55
- })],
-taps => [disptap(qw{
- 11 12 13 14 21 22 23 24 31 -31 -13 32 33
- 34 41 42 -13 43 44 15 51 52 53 -25 -31 54
- })],
-ics => [
+'Braille' => [qw{ â â â â â â â â â â â
â â â â â â â â â â ¥ â § â º â â ½ â µ }],
+'Morse' => [map {tr/.-/â§â/r} qw{
+ .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. --
+ -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..
+}],
+'Tap code' => [disptap(qw{
+ 11 12 13 14 15 21 22 23 24 -24 25 31 32
+ 33 34 35 41 42 43 44 45 51 52 53 54 55
+})],
+'Tap simplified' => [disptap(qw{
+ 11 12 13 14 21 22 23 24 31 -31 -13 32 33
+ 34 41 42 -13 43 44 15 51 52 53 25 -31 54
+})],
+'Maritime flags' => [
+ # International Code of Signals, SVG fills
map { '' }
split /\n\n/, qq{
@@ -68,7 +70,7 @@ ics => [
-
+
@@ -134,28 +136,27 @@ ics => [
},
],
-sem => [
+'Flag semaphore' => [
map {
local $_ = $_;
s/[1-4]\K(?=[4-9])/Â /;
tr/1-9/ââââââââ/;
- s{(.)(?=.)}{$1}
- or s/^// and $_ .= '';
+ s{(\S)(?=.)}{$1};
$_
}
qw(
- 1 2 3 4 5 6 7 21 31 46 14 15 16 17 23
+ 1 2 3 4 5 6 7 21 31 46 14 51 16 17 23
24 25 26 27 34 35 47 56 57 36 67
)
],
-semc => [
+'Chappe semaphore' => [
map {
my ($r, $pr, $pl) = split //, $_;
!$_ ? '-' : sprintf(
join('',
'',
),
['6', '3v3', '9v-3']->[$pl],
@@ -170,15 +171,46 @@ semc => [
001 101 201 301 401 501 601 701 020
)
],
-code39 => [map { tr/012/âââ/r } qw{
- 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
-}],
-rm4scc => [
+'Prussian semaphore' => [
+ map { !$_ ? '-' : sprintf
+ join('',
+ '',
+ ),
+ map { ($_ - 2) * 45 % 360 } split //, $_
+ }
+ # rotation state (0-3) for left and right bar of 3 rows
+ qw(
+ 003000 000200 203300 000030 033030 000130 000330 032330 031330 031330
+ 022020 130120 001320 233010 030210 022310 203001 233001
+ 131001 231301 000202 023302 230003 032003 201003 101003
+ )
+],
+'Code 39' => [
+ # ISO/IEC 16388
+ map { tr/012/âââ/r } qw(
+ 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
+ )
+],
+'Code 128' => [
+ map { tr/1-3-/ââââ/r }
+ # bar widths (1-3) followed by space of width 1 (implied) or 3 (-)
+ 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
+ )
+],
+'RM4SCC' => [
map { sprintf
'',
+ . '',
join ' m2',
map { sprintf ',%dv%dm0,-%d',
($_ & 1 ? 0 : 2), 2 + ($_ & 2) + ($_ & 1) * 2,
@@ -194,9 +226,46 @@ rm4scc => [
1122 1302 1320 3102 3120 3300
)
],
-pigpen => [qw( ᧠á ᪠á â¡ á ᣠá ᥠᲠ᫠ᷠá ð ᮠᬠᬠᯠᯠ᳠Ḡᱠá á
á á )],
-wingdings => [qw{ â ð ð ð â â â â â ⺠ð â¹ ð£ â â ð± â â¼ ð§ â ð â ð â ⡠⪠}],
-colour => [
+'Pigpen' => [
+ map {
+ qq()
+ }
+ map {
+ local $_ = $_;
+ s/^H/mX,0/ or s/^V/m0,X/ or s/^/m0,0/;
+ s/[hv]\K|X/6/g;
+ s/(?:v|,[^0]).*?v\K/-/;
+ s/(?:h|m[^0]).*?h\K/-/;
+ m/h/ or s/v/l3,/g;
+ m/v/ or s/h([^h]*)/l$1,3/g;
+ my $dot = s/\.// && qq();
+ qq($dot)
+ }
+ qw(
+ Hvh vhv vh hvh vhvh Hhvh hv Vvhv Hhv
+ Hvh. vhv. vh. hvh. vhvh. Hhvh. hv. Vvhv. Hhv.
+ vv hh Hhh Vvv
+ vv. hh. Hhh. Vvv.
+ ),
+],
+'Nyctographs' => [
+ map { s/M[\d,\hM]+(?=[M"])//gr } # clean up superfluous moves
+ map { sprintf
+ '',
+ ' stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" fill="none"',
+ 'h.5v.5h-.5v-.5', # start anchor
+ map { ['M', 'h0M', 'L']->[$_] }
+ 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
+ 0222 2222 0102 0200 2201 2002 2200 0100 0110 0120 2001 2010 2020
+ ),
+],
+'Chromacons' => [
+ # Colour Alphabet by Paul Green-Armytage (2010)
map { sprintf '%s', split(/:/, $_), chr(8195) }
qw{
F0A3FF:Amethyst 0075DC:Blue 993F00:Caramel 4C005C:Damson 191919:Ebony