From 78ab2cc012e8290671af6f601d78ba3530dab3aa Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 19 Dec 2023 19:34:18 +0100 Subject: [PATCH] keyboard/altgr: unicode description in unshifted title --- Shiar_Sheet/FormatChar.pm | 2 +- keyboard/altgr/groups.inc.pl | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Shiar_Sheet/FormatChar.pm b/Shiar_Sheet/FormatChar.pm index c93a48a..72d2e3d 100644 --- a/Shiar_Sheet/FormatChar.pm +++ b/Shiar_Sheet/FormatChar.pm @@ -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 = "$cell" if $class and $class =~ /\bZs\b/; $cell = ' ' if $cell eq ''; diff --git a/keyboard/altgr/groups.inc.pl b/keyboard/altgr/groups.inc.pl index 92cbb03..036a21f 100644 --- a/keyboard/altgr/groups.inc.pl +++ b/keyboard/altgr/groups.inc.pl @@ -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"], -- 2.30.0