common: captioned alert messages
[sheet.git] / font.plp
index 53157649f84006f9fa01eec3d0dba1b5d9996b7a..cc07c0528344b810a6e1ecc44bf8e7e545f9dd83 100644 (file)
--- a/font.plp
+++ b/font.plp
@@ -1,11 +1,10 @@
 <(common.inc.plp)><:
-use 5.014;
 
-my $font = $ENV{PATH_INFO} =~ s{^/}{}r;
+my $font = $Request;
 
 Html({
        title => 'font coverage '.($font ? "for $font" : 'sheet'),
-       version => 'v1.2',
+       version => '1.2',
        keywords => [qw(
                unicode font glyph char character support overview cover coverage
                script block symbol sign mark reference table
@@ -108,7 +107,7 @@ EOT
                say sprintf '<tr><th>%X', $cp if $colpos++ % $pagecols == 0;
 
                my $info = $glyphs->glyph_info($cp);
-               my ($class, $name, $mnem, $html, $string) = @{$info};
+               my ($class, $name, $mnem, $entity, $string) = @{$info};
                my $np = $class =~ /\bC\S\b/;  # noprint if control or invalid
                # display literal character, with placeholder circle if non-spacing/enclosing
                my $html = ($class =~ /\bM[ne]\b/ && chr 9676) . EscapeHTML(chr $cp);
@@ -179,7 +178,7 @@ if (my $group = $get{q}) {
 
 # output character list
 
-print '<table class=mapped>';
+print '<table class="mapped cover">';
 print '<col><col>';
 print "<colgroup span=$_>"
        for map { scalar @{ $cover->{os}->{$_} } } @ossel;
@@ -227,7 +226,7 @@ for (@rows) {
 
                my $rel = $count / $row->{count};
                my $class = $rel < .5 ? 2 : $rel < .9 ? 3 : 4;
-               printf '<td class="%s">%d%%', "l$class", $rel*100;
+               printf '<td class="%s">%d', "l$class", $rel*10;
        }
        say '</tr>';
 }