latin: nyctographic alphabet by caroll
[sheet.git] / writing-latn.inc.pl
index 0b08ae49eaf061eee75923b872c626c13f929540..e259da599230216515ca6a29dbe88a886e206db3 100644 (file)
@@ -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 }],
+'<abbr title="American Sign Lanugage">ASL</abbr>' => [
+       # 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 { '<svg width="20" height="20" viewBox="0 0 30 30">'.$_.'</svg>' }
        split /\n\n/, qq{
                <path fill="$C{blue}" d="M0,0 h30 l-7.5,15 7.5,15 h-30 z"/>
@@ -134,7 +136,7 @@ ics => [
                <path fill="$C{red}" d="M0,30 h31 l-15,-15"/>
        },
 ],
-sem => [
+'Flag semaphore' => [
        map {
                local $_ = $_;
                s/[1-4]\K(?=[4-9])/ /;
@@ -148,12 +150,57 @@ sem => [
                24 25 26 27 34  35 47 56 57 36  67
        )
 ],
-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 => [
+'Chappe semaphore' => [
+       map {
+               my ($r, $pr, $pl) = split //, $_;
+               !$_ ? '-' : sprintf(
+                       join('',
+                               '<svg width="20" height="20" viewBox="0 0 10 15">',
+                               '<path stroke="black" d="M5,6 v7"/>',
+                               '<path stroke="black" fill="none" d="M0,%s h10 %s" transform="rotate(%d 5 6)"/>',
+                               '</svg>',
+                       ),
+                       ['6', '3v3', '9v-3']->[$pl],
+                       [ '',  'v3',  'v-3']->[$pr],
+                       $r * 45,
+               );
+       }
+       # 360° rotation (0-7) and position state (0-2) of left and right bars
+       qw(
+         021 121 221 321 421 521 621 721
+         022 022 122 222 322 011 111 211 311
+         001 101 201 301 401 501 601 701 020
+       )
+],
+'Prussian semaphore' => [
+       map { !$_ ? '-' : sprintf
+               join('',
+                       '<svg width="20" height="20" viewBox="0 0 8 18">',
+                       '<path stroke="black" d="M4,1 v18"/>',
+                       (map {(
+                               qq(<path stroke="black" d="M0 $_ h4" transform="rotate(%d 4 $_)"/>),
+                               qq(<path stroke="black" d="M4 $_ h4" transform="rotate(-%d 4 $_)"/>),
+                       )} 3, 7, 14),
+                       '</svg>',
+               ),
+               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
+       )
+],
+'<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
        map { sprintf
                '<svg width="20" height="20" viewBox="0 0 8 6">'
                . '<path stroke="black" d="M1%s"/></svg>',
@@ -172,5 +219,34 @@ rm4scc => [
                1122 1302 1320 3102 3120 3300
        )
 ],
-wingdings => [qw{ ✌ 👌 👍 👎 ☜ ☞ ☝ ☟ ✋ ☺ 😐 ☹ 💣 ☠ ⚐ 🏱 ✈ ☼ 💧 ❄ 🕆 ✞ 🕈 ✠ ✡ ☪ }],
+'Pigpen' => [qw( ᒧ ᑌ ᒪ  ᑐ □ ᑕ  ᒣ ᑎ ᒥ  ᒲ ᕫ ᒷ  ᕭ 🞔 ᕮ ᒬ ᕬ ᒯ  ᐯ ᐳ ᐸ ᐱ  ᐁ ᐅ ᐊ ᐃ  )],
+'Nyctographs' => [
+       map { s/M[\d,\hM]+(?=[M"])//gr }  # clean up superfluous moves
+       map { sprintf
+               '<svg width="14" height="14" viewBox="-.5 -.5 5 5">'
+               . '<path%s d="M0,0%s %s4,0 %s4,4 %s0,4 %s0,0"/></svg>',
+               ' stroke="black" 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
+       ),
+],
+'Wingdings' => [qw{ ✌ 👌 👍 👎 ☜ ☞ ☝ ☟ ✋ ☺ 😐 ☹ 💣 ☠ ⚐ 🏱 ✈ ☼ 💧 ❄ 🕆 ✞ 🕈 ✠ ✡ ☪ }],
+'Chromacons' => [
+       # Colour Alphabet by Paul Green-Armytage (2010)
+       map { sprintf '<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
+               FFFF80:Xanthin  FFFF00:Yellow    FF5005:Zinnia
+       },
+],
 );