digits: title exceptions in table spec
[sheet.git] / digits.plp
1 <(common.inc.plp)><:
2
3 Html({
4         title => 'digit characters sheet',
5         version => '1.0',
6         description => [
7                 "Unicode glyphs of numbers 0 to 10 in various scripts.",
8         ],
9         keywords => [qw(
10                 numeral numerical digit number counting decimal
11                 script glyph unicode writing comparison list character
12                 history sample test language multilingual
13         )],
14         stylesheet => [qw( light dark circus mono red )],
15         data => [qw'writing-digits.inc.pl'],
16 });
17
18 :>
19 <h1>Numerals</h1>
20
21 <p>Digits and numbers counting up to ten
22 in various <a href="/writing">writing systems</a>.</p>
23
24 <div>
25
26 <:
27 use List::Util qw( pairs );
28 use Shiar_Sheet::FormatChar 1.08;
29 my $glyphs = Shiar_Sheet::FormatChar->new;
30 unless (exists $get{v}) {
31         $glyphs->{unicode}--;
32         $glyphs->{anno}  = [];
33         $glyphs->{style} = 'univer';
34 }
35
36 my $scriptname = do 'writing-script.inc.pl';
37 $_ = qq{<a href="/latin">$_</a>} for $scriptname->{latn} || ();
38
39 my @table = do "writing-digits.inc.pl";
40 die "Table data not found: $_\n" for $@ || $! || ();
41
42 say $glyphs->tabletag;
43 for my $row (pairs @table) {
44         my ($id, $info) = @{$row};
45         my $title = $info->{title} // $scriptname->{$id} || $id;
46         print $glyphs->row([ ".>$title", @{$info->{list}} ]);
47 }
48 say '</table>';
49
50 :></div>
51
52 <hr>
53