latin: rm4scc circumfix
[sheet.git] / writing-latn.inc.pl
index 4186f183721cd95fbd66c12d6dbfe61d95dfd754..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 }],
-'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",
@@ -301,15 +301,19 @@ my $U = 0;  # optional unicode alternatives
        )
 ],
 '<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
@@ -318,7 +322,8 @@ my $U = 0;  # optional unicode alternatives
                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 {