latin: reformat tap codes to suþscript digits
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 5 Jun 2015 20:03:42 +0000 (22:03 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:42 +0000 (05:43 +0200)
writing-latn.inc.pl

index 58499007120d295f48395fca0d929ee7d2e973e9..f763d3591322f129eb271ae336ae8f1176d526e9 100644 (file)
@@ -1,5 +1,14 @@
 use utf8;
 
+sub disptap {
+       map {
+               m/\A(-?)(\d)(\d)/;
+               $1 . '\\'  # escape dot
+               . chr($2 > 3 ? 0x2070 + $2 : $2 == 1 ? 0xB9 : 0xB0 + $2) # superscript
+               . chr(0x2080 + $3) # subscript digit
+       } @_
+}
+
 (
 latn     => [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 }],
@@ -9,8 +18,8 @@ morse    => [map {tr/.-/‧‑/r} qw{
                .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. --
                -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..
             }],
-tap      => [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
-            }],
+            })],
 );