X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0ef6354c95222a6da6db28bf1e6d536f5fae8282..cbc1de6f50a19ddb875fab91fcb97ab3c65c402e:/chars.plp diff --git a/chars.plp b/chars.plp index 83c40ab..d4cf06b 100644 --- a/chars.plp +++ b/chars.plp @@ -8,9 +8,17 @@ Html({ '], stylesheet => [qw'light dark mono circus red'], data => [qw( unicode-cover.inc.pl ttfsupport unicode-char.inc.pl )], + raw => <<'EOT', + +EOT }); -use 5.010; use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; @@ -34,8 +42,7 @@ for my $fontid (@fontlist) { my ($title, $parent) = ('Character overview'); my $query = eval { - for ($ENV{PATH_INFO} || ()) { - s{^/}{}; + for ($Request || ()) { return $_ if m{^[0-9 +-]+$}; my ($cat, $name) = split m{/}, $_, 2 or die "invalid query\n"; @@ -55,7 +62,7 @@ my $query = eval { say "

$title

"; if (!$query) { - say "

Unicode group not specified: $@

"; + Alert('Unicode group not specified', $@); exit; }; @@ -114,14 +121,14 @@ for my $chr (@chars) { my $codepoint = ord $chr; my $ascii = $codepoint <= 127; - print "$chr\n"; + say '', $chr; my $info = $glyphs->glyph_info($codepoint); - my ($class, $name, $mnem, $html, $string) = @$info; + my ($class, $name, $mnem, $entity, $string) = @$info; print "$_" for sprintf('%X', $codepoint), EscapeHTML($name || '?'); printf '%s', @$_ for ( [$ascii ? 'l0' : defined $mnem ? $class =~ /\bu-di\b/ ? 'l4' : 'l3' : 'l1', EscapeHTML($mnem) // ''], - [$ascii ? 'l0' : defined $html ? 'l4' : 'l1', $html // ''], + [$ascii ? 'l0' : defined $entity ? 'l4' : 'l1', $entity // ''], (map { !defined $font{$_}->{-name} ? [l0 => '?'] : $font{$_}->{$chr} ? [l4 => '✔'] : [l1 => '✘']