4 title => 'character support sheet',
7 unicode font glyph char character support overview cover coverage
8 script block symbol sign mark reference table
10 stylesheet => [qw( light dark mono circus red )],
11 data => [qw( unicode-cover.inc.pl )],
15 <h1>Font coverage</h1>
18 Character support of Unicode
19 <a href="/charset">blocks</a> and <a href="/unicode">presets</a>.
26 use Shiar_Sheet::FormatChar;
27 my $glyphs = Shiar_Sheet::FormatChar->new;
30 win95 => [qw( arial ariuni verdana times courier )], # microsoft
31 mac10 => [qw( )], # apple
32 android => [qw( droidsans )], # google
33 oss => [qw( dvsans c2k unifont )],
35 my @ossel = qw( win95 oss android );
36 my @fontlist = map { @{ $oslist{$_} } } @ossel;
38 my $cover = do 'unicode-cover.inc.pl' or die $@ || $!;
40 # output character list
42 print '<table class=mapped>';
44 print "<colgroup span=$_>" for map { scalar @{$oslist{$_}} } @ossel;
47 print '<th colspan=2>';
48 printf '<th colspan=%d>%s fonts', scalar @{ $oslist{$_} }, $_ for @ossel;
51 print '<th colspan=2>';
52 printf '<td>%s', $_ for @fontlist;
55 for my $group (sort keys %{$cover}) {
57 for my $name (sort keys %{ $cover->{$group} }) {
58 my $row = $cover->{$group}->{$name};
60 $name = sprintf '<a href="%s">%s</a>', EncodeURI("/chars/$group/$name"), EscapeHTML($name)
61 if $row->{-count} and $row->{-count} < 1280;
63 print '<td class=right>', $row->{-count};
65 my $count = $row->{$_};
66 if (not defined $count) {
67 print '<td class="l0">?';
71 print '<td class="l1">0';
75 my $rel = $count / $row->{-count};
76 my $class = $rel < .5 ? 2 : $rel < .75 ? 3 : $rel < 1 ? 4 : 5;
77 printf '<td class="%s">%d%%', "l$class", $rel*100;