From 92884d838c7e5fc4b9bd27043bf6f1054898b182 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 8 Apr 2017 04:40:43 +0200 Subject: [PATCH] charset: compare option to indicate differences with parent --- charset.plp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/charset.plp b/charset.plp index 5e16116..49ee2e7 100644 --- a/charset.plp +++ b/charset.plp @@ -323,6 +323,20 @@ for my $row (@request) { next; } + if (exists $get{compare}) { + state $visible = {}; + my $cp = $offset + $row->{offset}; + printf '%2$s', + $cp == ord $glyph ? 'l4' : + $row->{parent} && $glyph eq + Encode::decode($row->{parent}, pack 'C', $cp) ? 'l3' : + $visible->{$glyph} ? 'l2' : + 'l1', + $glyphs->glyph_html($glyph); + $visible->{$glyph}++; + next; + } + print "\n".$glyphs->glyph_cell($glyph); } continue { -- 2.30.0