latin: reformat tap codes to suþscript digits
[sheet.git] / writing-latn.inc.pl
1 use utf8;
2
3 sub disptap {
4         map {
5                 m/\A(-?)(\d)(\d)/;
6                 $1 . '\\'  # escape dot
7                 . chr($2 > 3 ? 0x2070 + $2 : $2 == 1 ? 0xB9 : 0xB0 + $2) # superscript
8                 . chr(0x2080 + $3) # subscript digit
9         } @_
10 }
11
12 (
13 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 }],
14 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 }],
15 ase      => [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 }],
16 brai     => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }],
17 morse    => [map {tr/.-/‧‑/r} qw{
18                 .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. --
19                 -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --..
20             }],
21 tap      => [disptap(qw{
22                 11 12 13 14 15 21 22 23 24 -24 25 31 32
23                 33 34 35 41 42 43 44 45 51 52 53 54 55
24             })],
25 );