+</style>
+EOT
+ say '<table class="glyphs big">';
+
+ my $offsetlink = '?' . join('&',
+ (map { $_ . '=' . EncodeURI($get{$_}) } grep { defined $get{$_} } qw{ map }),
+ 'q',
+ );
+ say "<caption>$_</caption>" for join(' ', grep {$_}
+ $offset > $pagerows && sprintf('<a rel="start" href="%s=%d">◄</a>', $offsetlink, 0),
+ $offset > 0 && sprintf(
+ '<a rel="prev nofollow" href="%s=%d" title="U+%2$04X">◅</a>',
+ $offsetlink, $offset - $pagerows,
+ ),
+ sprintf('U+%04X', $map ? $map->[$offset] : $offset),
+ Unicode::UCD::charblock($map ? $map->[$offset] : $offset),
+ $offset + $pagerows < ($map ? @{$map} : 0x11_0000) && sprintf(
+ '<a rel="next nofollow" href="%s=%d" title="U+%2$04X">▻</a>',
+ $offsetlink, $offset + $pagerows,
+ ),
+ );
+
+ for my $cp ($offset .. $offset+$pagerows-1) {
+ $cp = $map->[$cp] or next if $map;
+
+ state $colpos;
+ my $block = Unicode::UCD::charblock($cp);
+ if ($block ne (state $sameblock = $block) and $block ne 'No_Block') {
+ print '<tbody>';
+ printf '<tr><th colspan=%d>%s', $pagecols+1, $block
+ unless $block eq 'No_Block';
+ say '';
+ $sameblock = $block;
+ $colpos = 0;
+ }
+
+ if ($map) {
+ # compare previous code point and indicate gaps
+ state $lastcp = 0;
+ if ($cp != ++$lastcp) {
+ if (!$colpos or $colpos++ % $pagecols > $pagecols - 3) {
+ # nearly last column, start new row
+ $colpos = 0;
+ }
+ else {
+ # mark repositioning in existing row
+ printf '<th>%X', $cp;
+ }
+ $lastcp = $cp;
+ }
+ }
+
+ say sprintf '<tr><th>%X', $cp if $colpos++ % $pagecols == 0;
+
+ my $info = $glyphs->glyph_info($cp);
+ 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
+ $string ||= ($class =~ /\bM[ne]\b/ && chr 9676) . chr($cp);
+ my $html = $np ? !!$cover{$cp} && sprintf("&#%d;", $cp) :
+ EscapeHTML($string);
+ say sprintf '<td class="%s" title="U+%04X%s">%s',
+ !$class ? ('l0', $cp, '', '') : (
+ $cover{$cp} ? $np ? 'l2' : 'l5' : $np ? 'Xi' : 'l1',
+ $cp, !!$name && ": $name",
+ $html
+ );