From 344c5c6bf56aca4d4117ed70dbd007c3f2a5e135 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 22 Aug 2015 02:34:57 +0200 Subject: [PATCH] latin: identify rows by titles instead of script codes While shorter strings might be more stable for future translation, currently it only harms readability by distancing displayed names behind unrecognisable codes. --- latin.plp | 23 +--------------- writing-latn.inc.pl | 66 ++++++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 52 deletions(-) diff --git a/latin.plp b/latin.plp index ffdb581..c146fcc 100644 --- a/latin.plp +++ b/latin.plp @@ -39,34 +39,13 @@ unless (exists $get{v}) { $glyphs->{style} = 0; } -my %scriptname = ( - latn => 'Latin', - latnuc => 'Uppercase', - latnlc => 'Lowercase', - latfsuet => 'Sütterlin', - asl => 'ASL', # American manual alphabet - brai => 'Braille', - morse => 'Morse', - tap => 'Tap code', - taps => 'Tap simplified', - ics => 'Maritime flags', # International Code of Signals - sem => 'Flag semaphore', - semc => 'Chappe semaphore', - semp => 'Prussian semaphore', - pigpen => 'Pigpen', - wingdings=> 'Wingdings', - code39 => 'Code 39', # ISO/IEC 16388 - rm4scc => 'RM4SCC', - colour => 'Chromacons', # Colour Alphabet by Paul Green-Armytage (2010) -); - my @table = do 'writing-latn.inc.pl'; if ($! or $@) { printf "

Table data not found: %s.

\n", $@ || $!; } else { print $glyphs->table([map { - ref $_ ne 'ARRAY' ? ".>$scriptname{$_}" + ref $_ ne 'ARRAY' ? ".>$_" : exists $get{uc} ? map {uc} @$_ : @$_ } @table]); } diff --git a/writing-latn.inc.pl b/writing-latn.inc.pl index 43728c4..fb22bbb 100644 --- a/writing-latn.inc.pl +++ b/writing-latn.inc.pl @@ -13,10 +13,11 @@ sub disptap { my %C = qw(red #EC1C24 blue #3953A3 yellow #F9EC31 black #231F20); ( -latnuc => [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 }], -latnlc => [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 }], -asl => [ +'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 }], +'ASL' => [ + # American manual alphabet in Sutton (U+1D800+) notation map { pack 'W*', map { hex "1D$_" } unpack '(A3)*', $_ } qw{ 8F7a9c 847a9c 86Da9c 801a9c 84Aa9c 8CEa9c 8F0 815aa2 892a9c 892a9c9A2aac @@ -25,20 +26,21 @@ asl => [ 903a9c 8FBa9c 815a9c 80Ea9c 887a9c 806a9c 89Aa9c 800a9c945aaa }], -brai => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }], -morse => [map {tr/.-/‧‑/r} 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 - })], -taps => [disptap(qw{ - 11 12 13 14 21 22 23 24 31 -31 -13 32 33 - 34 41 42 -13 43 44 15 51 52 53 -25 -31 54 - })], -ics => [ +'Braille' => [qw{ ⠁ ⠃ ⠉ ⠙ ⠑ ⠋ ⠛ ⠓ ⠊ ⠚ ⠅ ⠇ ⠍ ⠝ ⠕ ⠏ ⠟ ⠗ ⠎ ⠞ ⠥ ⠧ ⠺ ⠭ ⠽ ⠵ }], +'Morse' => [map {tr/.-/‧‑/r} qw{ + .- -... -.-. -.. . ..-. --. .... .. .--- -.- .-.. -- + -. --- .--. --.- .-. ... - ..- ...- .-- -..- -.-- --.. +}], +'Tap code' => [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 +})], +'Tap simplified' => [disptap(qw{ + 11 12 13 14 21 22 23 24 31 -31 -13 32 33 + 34 41 42 -13 43 44 15 51 52 53 -25 -31 54 +})], +'Maritime flags' => [ + # International Code of Signals, SVG fills map { ''.$_.'' } split /\n\n/, qq{ @@ -134,7 +136,7 @@ ics => [ }, ], -sem => [ +'Flag semaphore' => [ map { local $_ = $_; s/[1-4]\K(?=[4-9])/ /; @@ -148,7 +150,7 @@ sem => [ 24 25 26 27 34 35 47 56 57 36 67 ) ], -semc => [ +'Chappe semaphore' => [ map { my ($r, $pr, $pl) = split //, $_; !$_ ? '-' : sprintf( @@ -170,7 +172,7 @@ semc => [ 001 101 201 301 401 501 601 701 020 ) ], -semp => [ +'Prussian semaphore' => [ map { !$_ ? '-' : sprintf join('', '', @@ -190,12 +192,15 @@ semp => [ 131001 231301 000202 023302 230003 032003 201003 101003 ) ], -code39 => [map { tr/012/ ❘❙/r } qw{ - 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 -}], -rm4scc => [ +'Code 39' => [ + # ISO/IEC 16388 + map { tr/012/ ❘❙/r } qw( + 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 + ) +], +'RM4SCC' => [ map { sprintf '' . '', @@ -214,9 +219,10 @@ rm4scc => [ 1122 1302 1320 3102 3120 3300 ) ], -pigpen => [qw( ᒧ ᑌ ᒪ ᑐ □ ᑕ ᒣ ᑎ ᒥ ᒲ ᕫ ᒷ ᕭ 🞔 ᕮ ᒬ ᕬ ᒯ ᐯ ᐳ ᐸ ᐱ ᐁ ᐅ ᐊ ᐃ )], -wingdings => [qw{ ✌ 👌 👍 👎 ☜ ☞ ☝ ☟ ✋ ☺ 😐 ☹ 💣 ☠ ⚐ 🏱 ✈ ☼ 💧 ❄ 🕆 ✞ 🕈 ✠ ✡ ☪ }], -colour => [ +'Pigpen' => [qw( ᒧ ᑌ ᒪ ᑐ □ ᑕ ᒣ ᑎ ᒥ ᒲ ᕫ ᒷ ᕭ 🞔 ᕮ ᒬ ᕬ ᒯ ᐯ ᐳ ᐸ ᐱ ᐁ ᐅ ᐊ ᐃ )], +'Wingdings' => [qw{ ✌ 👌 👍 👎 ☜ ☞ ☝ ☟ ✋ ☺ 😐 ☹ 💣 ☠ ⚐ 🏱 ✈ ☼ 💧 ❄ 🕆 ✞ 🕈 ✠ ✡ ☪ }], +'Chromacons' => [ + # Colour Alphabet by Paul Green-Armytage (2010) map { sprintf '%s', split(/:/, $_), chr(8195) } qw{ F0A3FF:Amethyst 0075DC:Blue 993F00:Caramel 4C005C:Damson 191919:Ebony -- 2.30.0