keyboard/altgr/index: move ctrl rows to distinct inventory mode
[sheet.git] / font.plp
index f17eab569e16c522d717b46959000b4ce3ecee8f..d7892626e8b9792bcbce4cff5362339cdf738948 100644 (file)
--- a/font.plp
+++ b/font.plp
@@ -4,7 +4,7 @@ my $font = $Request;
 
 Html({
        title => 'font coverage '.($font ? "for $font" : 'sheet'),
-       version => '1.3',
+       version => '1.4',
        keywords => [qw(
                unicode font glyph char character support overview cover coverage
                script block symbol sign mark reference table
@@ -109,13 +109,13 @@ EOT
        say "<caption>$_</caption>" for join(' ', grep {$_}
                $offset > $pagerows && sprintf('<a rel="start" href="%s=%d">◄</a>', $offsetlink, 0),
                $offset > 0 && sprintf(
-                       '<a rel="prev" href="%s=%d" title="U+%2$04X">◅</a>',
+                       '<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" href="%s=%d" title="U+%2$04X">▻</a>',
+                       '<a rel="next nofollow" href="%s=%d" title="U+%2$04X">▻</a>',
                        $offsetlink, $offset + $pagerows,
                ),
        );
@@ -156,12 +156,14 @@ EOT
                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
-               my $html = ($class =~ /\bM[ne]\b/ && chr 9676) . EscapeHTML(chr $cp);
+               $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",
-                       ($cover{$cp} || !$np) && $html
+                       $html
                        );
        }
        say '</table>';