<(common.inc.plp)><:
-use 5.014;
+
+my $font = $ENV{PATH_INFO} =~ s{^/}{}r;
Html({
- title => 'character support sheet',
- version => 'v1.1',
+ title => 'font coverage '.($font ? "for $font" : 'sheet'),
+ version => '1.2',
keywords => [qw(
unicode font glyph char character support overview cover coverage
script block symbol sign mark reference table
data => [qw( unicode-cover.inc.pl )],
});
-if (my $font = $ENV{PATH_INFO} =~ s{^/}{}r) {
+if ($font) {
my ($fontmeta, @cover) = do "ttfsupport/$font.inc.pl";
$fontmeta or die "Unknown font $font\n";
.glyphs tbody th[!colspan] { text-align: right }
.glyphs tbody td { font-family: "$fontmeta->{name}" }
.glyphs tbody td:nth-child(18) { border-left-width: 2px }
+ \@font-face {
+ font-family: "$fontmeta->{name}";
+ src: url(/data/font/$font.ttf);
+ }
</style>
EOT
say '<table class="glyphs big">';
# output character list
-print '<table class=mapped>';
+print '<table class="mapped cover">';
print '<col><col>';
print "<colgroup span=$_>"
for map { scalar @{ $cover->{os}->{$_} } } @ossel;
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>';
}