X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/d41fb64d4655e00ef12972ae3eda386e53446594..e1a650f4c80d7108a0f3e84b4b73271e42c67bcc:/latin.plp
diff --git a/latin.plp b/latin.plp
index 89afb61..56f9d03 100644
--- a/latin.plp
+++ b/latin.plp
@@ -2,39 +2,120 @@
Html({
title => 'latin alphabet cheat sheet',
- version => 'v1.0',
+ version => '1.4',
description => [
],
keywords => [qw'
latin roman alphabet script letter unicode font glyph abc
- writing comparison character sample test language
+ code encoding spelling symbol writing comparison character
+ secret cursive fraktur blind braille morse deaf asl hand
+ barcode bar color semaphore flag
'],
- stylesheet => [qw'light dark red'],
+ stylesheet => [qw( light dark red mono )],
+ data => ['writing-latn.inc.pl'],
});
:>
+
+
Latin alphabet
-Also see other alphabets
-and common chars.
+Variant encodings of the common ASCII (latin, roman,
+or 'mercan) letters AâZ.
+Also see related alphabets
+and font comparison.
-
+
<:
-use Shiar_Sheet::FormatChar;
-my $glyphs = Shiar_Sheet::FormatChar->new;
-unless (exists $get{v}) {
- $glyphs->{unicode}--;
- $glyphs->{digraph}--;
+use List::Util qw( pairs );
+
+my @table = do 'writing-latn.inc.pl';
+if ($! or $@) {
+ Alert("Table data not found", $@ || $!);
}
+else {
+ say '\n";
-my @t = (qw{
- .>Latin 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
- .>Braille â â â â â â â â â â â
â â â â â â â â â â ¥ â § â º â â ½ â µ
- .>Morse â§â ââ§â§â§ ââ§â⧠ââ§â§ ⧠â§â§â⧠ââ⧠â§â§â§â§ â§â§ â§âââ ââ§â â§ââ§â§ ââ
- â⧠âââ â§ââ⧠âââ§â â§â⧠â§â§â§ â â§â§â â§â§â§â â§ââ ââ§â§â ââ§ââ âââ§â§
-});
-print $glyphs->table(exists $get{uc} ? [map {s/\s.//; uc} @t] : \@t);
+ my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
+ say '
';
+ say '# ASCII â 64';
+ print ' | ', $_ for 1 .. 26;
+ say ' |
';
+
+ for my $row (pairs @table) {
+ my ($id, $info) = @{$row};
+
+ printf '', $id;
+ my $th = 'th';
+ $th .= sprintf ' title="%s"', $_ for $info->{title} || ();
+ say "<$th>", $info->{name} // ucfirst $id;
+
+ my $colspan = 1;
+ my $col = 0;
+ for (@{ $info->{list} }) {
+ $col++;
+ if ($_ eq '>') {
+ $colspan++;
+ next;
+ }
+ my @class;
+ push @class ,'l0' if $VOWELCOLS{$col - $colspan};
+ push @class, $_ ? 'ex' : 'u-invalid' if s/^-//;
+
+ print "\t 26) {
+ # special character for sample generation
+ print ' hidden'; # sample only
+ }
+ else {
+ print ' title=', chr($col + ord('A') - $colspan);
+ }
+ if ($colspan > 1) {
+ print " colspan=$colspan";
+ $colspan = 1;
+ }
+ printf ' class="%s"', "@class" if @class;
+ print '>';
+ say;
+ }
+ }
+ say " |
\n";
+}
+
+:>
-print "
\n";
+
+