latin: nyctographic alphabet by caroll
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 4 Sep 2015 15:30:16 +0000 (17:30 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 21 Sep 2015 22:20:08 +0000 (00:20 +0200)
Square alphabet created by Lewis Carroll ~1891: left top corner is always
marked, other corners are either connected, dotted, or skipped; encoded
numerically and drawn as svg path.

Allows for 34 possibilities with top left anchor:
  2^³        (3 dots, only used for A,U,V)
+ 2^²⋅4 − 2² (2 dots with 1 line, 3 unused)
+ 2^¹⋅4 − 2⁰ (1 dot with 2 lines)
+ 2^⁰⋅4      (3 lines)
+ 2⁻¹⋅4      (2 parallel lines)
+ 2⁻²⋅4      (square)

Reference: <http://www.lewiscarroll.org/tag/nyctograph/>

writing-latn.inc.pl

index fb22bbb94692f39fcc901f39d9fff510cb45c313..e259da599230216515ca6a29dbe88a886e206db3 100644 (file)
@@ -220,6 +220,22 @@ my %C = qw(red #EC1C24  blue #3953A3  yellow #F9EC31  black #231F20);
        )
 ],
 'Pigpen' => [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)
 'Wingdings' => [qw{ ✌ 👌 👍 👎 ☜ ☞ ☝ ☟ ✋ ☺ 😐 ☹ 💣 ☠ ⚐ 🏱 ✈ ☼ 💧 ❄ 🕆 ✞ 🕈 ✠ ✡ ☪ }],
 'Chromacons' => [
        # Colour Alphabet by Paul Green-Armytage (2010)