X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e3e4c296dc5549aea747ecbd01366a372d304261..eea96a232c342a6e73c9a8acdc8ee9e8218fe2ae:/charset.plp diff --git a/charset.plp b/charset.plp index 9bdf363..080e208 100644 --- a/charset.plp +++ b/charset.plp @@ -22,7 +22,6 @@ Html({ use Shiar_Sheet::FormatChar; my $glyphs = Shiar_Sheet::FormatChar->new; my $cols = 16; # columns -my $colsize = 1; # increment per column # generate character table(s) # (~16x faster than decoding in loop; @@ -67,7 +66,6 @@ my @request = map { $row{set} = 'Unicode planes'; $row{cell} = do 'charset-ucplanes.inc.pl' or Alert('Table data could not be read', $@ || $!); - $colsize = 8; $cols *= 2; } elsif ($row{set} = Encode::resolve_alias($input)) { @@ -112,6 +110,7 @@ sub range_cell { my $def = $table->{$offset} or return; my ($len, $class, $name, $title) = @{$def}; + my $colsize = $table->{colsize} || 1; my $attr = ''; $len /= $colsize; $name //= $len <= 2 ? 'res' : 'reserved'; @@ -157,6 +156,7 @@ sub range_cell { } for my $row (@request) { + my $colsize = $row->{cell} && $row->{cell}->{colsize} || 1; printf '
', !$row->{cell} && ' charmap'; my $title = $row->{set}; $title .= " " for $row->{setnote} // ();