latin: rm4scc circumfix
[sheet.git] / writing-latn.inc.pl
index 403e36f94bdb36d8293dc6923a0484aebcd96496..f313a315cc56d1d28aaae5e07f26fd823c23c0d0 100644 (file)
@@ -16,7 +16,7 @@ my $U = 0;  # optional unicode alternatives
 (
 '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 }],
 (
 '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 }],
+'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 }],
 'Old Roman Cursive' => [
        map { m/^(-?)(\w.*)/ ? $1.'<svg width="20" height="20" viewBox="0 0 12 20"><path d="'.$2.'"/></svg>' : $_ }
        "m2,4 c1,2 8,9 8,9 M2,15 6,9",
 'Old Roman Cursive' => [
        map { m/^(-?)(\w.*)/ ? $1.'<svg width="20" height="20" viewBox="0 0 12 20"><path d="'.$2.'"/></svg>' : $_ }
        "m2,4 c1,2 8,9 8,9 M2,15 6,9",
@@ -48,13 +48,14 @@ 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(
 }],
 '<abbr title="International Telegraph Alphabet">ITA</abbr>2' => [
        map { tr/01/○●/r =~ s/..\K/ /r } qw(
@@ -86,17 +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
 })],
 'Cards' => [(
        map { chr(0x1F0A0 + $_), sprintf('<b>%s</b>', chr(0x1F0B0 + $_)) }  # spades, hearts
        1 .. 11, 13, 14  # A 2-10 J Q K
        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"/>
@@ -188,6 +189,14 @@ 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' => [
        },
 ],
 'Flag semaphore' => [
@@ -247,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                      102121
+               201112 102112 202111 101212 201211 102211        102121 0 101221
        )
 ],
 'Code 93' => [
        )
 ],
 'Code 93' => [
@@ -290,15 +301,19 @@ my $U = 0;  # optional unicode alternatives
        )
 ],
 '<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
        )
 ],
 '<abbr title="Royal Mail 4-State Customer Code">RM4SCC</abbr>' => [
-       map { sprintf
-               '<svg width="20" height="20" viewBox="0 0 8 6">'
-               . '<path d="M1%s"/></svg>',
-               join ' m2',
-               map { sprintf ',%dv%dm0,-%d',
-                       ($_ & 1 ? 0 : 2),  2 + ($_ & 2) + ($_ & 1) * 2,
-                       ($_ & 1 ? 0 : 2) + 2 + ($_ & 2) + ($_ & 1) * 2,
-               }
-               split //
+       map {
+               my $len = length $_;
+               !$len ? '' : sprintf(
+                       '<svg width="%d" height="20" viewBox="0 0 %d 6">'
+                       . '<path d="M1%s"/></svg>',
+                       $len * 5, $len * 2,
+                       join ' m2',
+                       map { sprintf ',%dv%dm0,-%d',
+                               ($_ & 1 ? 0 : 2),  2 + ($_ & 2) + ($_ & 1) * 2,
+                               ($_ & 1 ? 0 : 2) + 2 + ($_ & 2) + ($_ & 1) * 2,
+                       }
+                       split //
+               );
        }
        qw(
                                    2121 2301
        }
        qw(
                                    2121 2301
@@ -307,7 +322,8 @@ my $U = 0;  # optional unicode alternatives
                1032 1212 1230 3012 3030 3210
                1122 1302 1320 3102 3120 3300
                0033
                1032 1212 1230 3012 3030 3210
                1122 1302 1320 3102 3120 3300
                0033
-       ) # 0 for space
+       ), # 0 for space
+       '', 1, 3  # start/end
 ],
 'Pigpen' => [
        map {
 ],
 'Pigpen' => [
        map {