-:>
-<h1>Character support</h1>
-
-<p>
-Selected characters from Unicode <a href="/unicode">preset</a>
-or <a href="/charset">range</a>.
-</p>
+if (my $font = $ENV{PATH_INFO} =~ s{^/}{}r) {
+ 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.</p>\n",
+ !!$_->[2] && qq( title="revision $_->[2]"),
+ $_->[1], $_->[0],
+ scalar @cover,
+ ) for [
+ grep { $_ }
+ ($fontmeta->{date} || '?') =~ s/T.*//r,
+ EscapeHTML($fontmeta->{version}),
+ $fontmeta->{revision},
+ ];
+ printf "<p>%s</p>\n", join('<br>', map { $_ ? EscapeHTML($_) : () }
+ $fontmeta->{copyright}, $fontmeta->{license},
+ );