latin: chappe semaphore
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 22 Aug 2015 00:24:59 +0000 (02:24 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 22:20:08 +0000 (00:20 +0200)
<http://www.rioleo.org/the-true-origins-and-history-of-the-telegraph.php>

latin.plp
writing-latn.inc.pl

index 42d40033abb452ae7e84978af1670ff1f4321bf0..a83bc0dbe57fecdd552308a8cd20fd9208ab33fd 100644 (file)
--- a/latin.plp
+++ b/latin.plp
@@ -51,6 +51,7 @@ my %scriptname = (
        taps     => 'Tap simplified',
        ics      => 'Maritime flags', # International Code of Signals
        sem      => 'Flag semaphore',
        taps     => 'Tap simplified',
        ics      => 'Maritime flags', # International Code of Signals
        sem      => 'Flag semaphore',
+       semc     => 'Chappe semaphore',
        pigpen   => 'Pigpen',
        wingdings=> 'Wingdings',
        code39   => 'Code 39', # ISO/IEC 16388
        pigpen   => 'Pigpen',
        wingdings=> 'Wingdings',
        code39   => 'Code 39', # ISO/IEC 16388
index 0676e8b550109bd4a22b33f3394b38dee7e0ebde..2a20b7640071b8c2e3e17097254c5bf451106ad2 100644 (file)
@@ -148,6 +148,28 @@ sem => [
                24 25 26 27 34  35 47 56 57 36  67
        )
 ],
                24 25 26 27 34  35 47 56 57 36  67
        )
 ],
+semc => [
+       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
+       )
+],
 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
 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