common: join stylesheets html inline
[sheet.git] / chars.plp
index 775674ec62e98157571912f885dc5e46132657b6..96d74b4293285d0f2d345168bd7beb4d5ae11fce 100644 (file)
--- a/chars.plp
+++ b/chars.plp
@@ -2,7 +2,7 @@
 
 Html({
        title => 'character support sheet',
-       version => 'v1.0',
+       version => '1.0',
        keywords => [qw'
                unicode glyph char character reference common ipa symbol sign mark table digraph
        '],
@@ -10,7 +10,6 @@ Html({
        data => [qw( unicode-cover.inc.pl ttfsupport unicode-char.inc.pl )],
 });
 
-use 5.010;
 use Shiar_Sheet::FormatChar;
 my $glyphs = Shiar_Sheet::FormatChar->new;
 
@@ -89,7 +88,7 @@ for (map { split /[^\d-]/ } $query) {
 # output character list
 
 say '<div>';
-print '<table class=mapped>';
+print '<table class="mapped cover">';
 print '<col>' x 3;
 print "<colgroup span=$_>"
        for 2, map { scalar @{ $groupinfo->{os}->{$_} } } @ossel;
@@ -104,8 +103,10 @@ print '<tr>';
 print '<td colspan=2>unicode';
 print '<td>name';
 print '<td><a href="/digraphs" title="digraph">di</a><td>html';
-printf '<td title="%s">%s', $font{$_}->{-name}, $font{$_}->{-abbr}
-       for @fontlist;
+printf('<td title="%s">%s', map { EscapeHTML($_) }
+       join("\n", $font{$_}->{-name}, $font{$_}->{-description}),
+       $font{$_}->{-abbr},
+) for @fontlist;
 say '</thead>';
 
 for my $chr (@chars) {
@@ -114,12 +115,12 @@ for my $chr (@chars) {
 
        print "<tr><th>$chr\n";
        my $info = $glyphs->glyph_info($codepoint);
-       my ($class, $name, $mnem, $html, $string) = @$info;
+       my ($class, $name, $mnem, $entity, $string) = @$info;
        print "<td>$_" for sprintf('%X', $codepoint), EscapeHTML($name || '?');
        printf '<td class="%s">%s', @$_ for (
                [$ascii ? 'l0' : defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : 'l1',
                        EscapeHTML($mnem) // ''],
-               [$ascii ? 'l0' : defined $html ? 'l4' : 'l1', $html // ''],
+               [$ascii ? 'l0' : defined $entity ? 'l4' : 'l1', $entity // ''],
                (map {
                        !defined $font{$_}->{-name} ? [l0 => '?'] :
                        $font{$_}->{$chr} ? [l4 => '✔'] : [l1 => '✘']