and <a href="/chars/abc">font comparison</a>.</p>
<:
-use List::Util qw( pairs );
-
-my @table = Data('writing-latn');
+my $table = Data('writing-latn');
{
say '<div>';
say '<style>';
- for my $row (pairs @table) {
- my ($id, $info) = @{$row};
+ while (my ($id, $info) = each %$table) {
+ ref $info eq 'HASH' or next;
my $style = $info->{style} or next;
ref $style or $style = [$style];
say "\t", !/^@/ && "#$id ", $_ for @{$style};
}
say "</style>\n";
+}
- my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
- say '<table class="glyphs">';
- say '<thead><tr><th># <small>ASCII − 64</small>';
- print '<td>', $_ for 1 .. 26;
- say '</thead>';
+my %VOWELCOLS = (map { ($_ => 1) } 0, 4, 8, 14, 20, 24);
+say '<table class="glyphs">';
+say '<thead>';
+printtr('order');
+say '</thead>';
+printtr('default');
+say "</table></div>";
- for my $row (pairs @table) {
- my ($id, $info) = @{$row};
+sub printtr {
+ for my $id (@_) {
+ my $info = $table->{$id};
+
+ if (ref $info eq 'ARRAY') {
+ printtr(@{$info});
+ next;
+ }
printf '<tr id="%s">', $id;
my $th = 'th';
say;
}
}
- say "</table></div>";
}
:>