+if ($font) {
+ my ($fontmeta, @cover) = do "ttfsupport/$font.inc.pl";
+ $fontmeta or die "Unknown font $font\n";
+
+ require Unicode::UCD;
+
+ my $pagerows = 0x200;
+ my $pagecols = 32;
+ my $offset = eval {
+ local $_ = $get{q} || 0;
+ return $_ if /\A\d+\z/; # numeric
+ return hex $1 if /\A (?: 0?x | u\W* ) ([0-9a-f]+) \z/ix; # hexadecimal
+ return $_->[0]->[0] for Unicode::UCD::charblock(ucfirst) || (); # block
+ die "Unknown offset query '$_'\n";
+ };
+ die $@ if $@;
+
+ say "<h1>Font coverage</h1>";
+ say "<h2>$_</h2>" for EscapeHTML($fontmeta->{name});
+ printf("<p>Version <strong%s>%s</strong> released %s contains %d glyphs.",
+ !!$_->[2] && qq( title="revision $_->[2]"),
+ $_->[1], $_->[0],
+ scalar @cover,
+ ) for [
+ grep { $_ }
+ ($fontmeta->{date} || '?') =~ s/T.*//r,
+ EscapeHTML($fontmeta->{version}),
+ $fontmeta->{revision},
+ ];
+ for ($fontmeta->{os}) {
+ say '<br>';
+ print ucfirst join(' ',
+ "distributed",
+ (map { "by $_" } $fontmeta->{oscorp} || "various sources"),
+ (map { "with <em>$_</em>" } $_ || ()),
+ ('and published as freeware "Core Web font"') x ($_ eq 'Windows 2000'),
+ (map { "under a $_ license" }
+ map { $fontmeta->{license} ? qq(<a href="$fontmeta->{license}">$_</a>) : $_ }
+ $_ && $_ ne 'Android' ? 'proprietary' : 'free',
+ ),
+ );
+ print '.';
+ }
+ say '</p>';
+ say "<p>$_</p>" for EscapeHTML($fontmeta->{copyright}) || ();