font: append placeholder circle to combining marks
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 16 Mar 2015 17:31:54 +0000 (18:31 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 9 Jun 2015 03:43:44 +0000 (05:43 +0200)
font.plp

index 75f0198496877cd6ef495c59e9002f2b3f006789..a7812d0e37515242a5117173eb6e7c8904427816 100644 (file)
--- a/font.plp
+++ b/font.plp
@@ -91,11 +91,13 @@ EOT
                my $info = $glyphs->glyph_info($cp);
                my ($class, $name, $mnem, $html, $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);
                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) && EscapeHTML(chr $cp);
+                       ($cover{$cp} || !$np) && $html;
        }
        say '</table>';