keyboard/altgr: unicode description in unshifted title
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 19 Dec 2023 18:34:18 +0000 (19:34 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 20 Dec 2023 00:27:29 +0000 (01:27 +0100)
Shiar_Sheet/FormatChar.pm
keyboard/altgr/groups.inc.pl

index c93a48a708fbff4eccddabfc0bd2a3102759d207..72d2e3dcadd0bc76072d004bd6562ead297fd288 100644 (file)
@@ -34,7 +34,7 @@ sub glyph_html {
        my ($class, $name, $mnem, $entity, $string) = @$info;
 
        my $cell = EscapeHTML($string || $char);
-       my $title = sprintf 'U+%04X%s', $codepoint, !!$name && " ($name)";
+       my $title = sprintf 'U+%04X%s', $codepoint, !!$name && " $name";
 
        $cell = "<span>$cell</span>" if $class and $class =~ /\bZs\b/;
        $cell = '&nbsp;' if $cell eq '';
index 92cbb0305dc28e810d7f8fe26746786339a4b551..036a21f9212c007161ca4112fc620fb26e986c54 100644 (file)
@@ -2,8 +2,11 @@ use strict;
 use warnings;
 use Unicode::Normalize qw( NFKD );
 use Text::Unidecode qw( unidecode );
+use Shiar_Sheet::FormatChar;
 
 our %rows;
+
+my $uc = Shiar_Sheet::FormatChar->new;
 my %g; # present group classes
 {
        rows => [1, 0],
@@ -26,7 +29,12 @@ my %g; # present group classes
                        } keys %rows
                },
        },
-       key => \%rows,
+       key => {
+               map {
+                       my ($glyph, $title) = $uc->glyph_html($rows{$_});
+                       $_ => join "\n", $glyph, $title
+               } keys %rows
+       },
        flag => {
                g2 => ['accented', "decomposes to the original letter with a combining accent"],
                g4 => ['similar', "transliterates (mostly) into the unmodified letter"],