index: release v1.18 with only altgr index linked
[sheet.git] / font.plp
index f17eab569e16c522d717b46959000b4ce3ecee8f..701957305cdcee045ee06d6b4b0156ffaff9400d 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
@@ -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>';