browser: prefer last stable release in versions row
[sheet.git] / writing.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'writing system inheritance sheet',
5         version => '1.2',
6         description => [
7                 "Character comparison,",
8                 "tracking letters as they evolve from Phoenician to modern scripts.",
9                 "Good Unicode test sample.",
10         ],
11         keywords => [qw'
12                 script glyph unicode writing comparison character alphabet letter
13                 history phoenician latin sample test language multilingual
14         '],
15         stylesheet => [qw'light circus dark red mono'],
16         data => [qw'writing-phnx.inc.pl'],
17 });
18
19 :>
20 <h1>Writing systems</h1>
21
22 <p>
23 Comparison of Unicode letters in related alphabets.
24 Also see <a href="/charset">charsets</a>
25 and <a href="/unicode">common chars</a>.</p>
26
27 <div class="section">
28
29 <:
30 use Shiar_Sheet::FormatChar;
31 my $glyphs = Shiar_Sheet::FormatChar->new;
32 unless (exists $get{v}) {
33         $glyphs->{unicode}--;
34         $glyphs->{anno}  = [];
35         $glyphs->{style} = 'univer';
36 }
37
38 my $scriptname = do 'writing-script.inc.pl';
39 $_ = showlink($_, "/latin") for $scriptname->{latn} || ();
40
41 for (
42         [phnx => 'Phoenician'],
43         [brah => 'Brahmi'],
44 ) {
45         my ($source, $title) = @$_;
46         my @table = do "writing-$source.inc.pl";
47         if ($! or $@) {
48                 say "<h2>$title</h2>";
49                 printf "<p>Table data not found: <em>%s</em>.</p>\n", $@ || $!;
50                 next;
51         }
52         $glyphs->print($title => [map {
53                 my $lead = s/^(-)// && $1;
54                 ref $_ eq 'ARRAY' ? @$_ : map { ".>$lead$_" }
55                         $scriptname->{$source.'_'.$_} || $scriptname->{$_} || $_
56         } @table]);
57 }
58
59 say "</div>\n";
60
61 say for '<hr/>', $glyphs->legend;
62