From: Mischa POSLAWSKY Date: Thu, 5 Mar 2015 03:50:28 +0000 (+0100) Subject: font: load unicode data optionally X-Git-Tag: v1.7~49 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/f130701c5006246ad789798d21550465db6c6502 font: load unicode data optionally --- diff --git a/tools/mkfontinfo b/tools/mkfontinfo index 3be474c..e212d94 100755 --- a/tools/mkfontinfo +++ b/tools/mkfontinfo @@ -57,13 +57,16 @@ eval { 1; } or warn "Could not include count for html entities: $@"; -use Unicode::UCD 'charinfo'; -for my $code (0 .. 256**2) { - my $charinfo = charinfo($code) or next; - next if $charinfo->{category} =~ /^[MC]/; # ignore Marks and "other" Control chars - push @{ $charlist{$_}->{ $charinfo->{$_} } }, chr $code - for qw( script category block ); -} +eval { + use Unicode::UCD 'charinfo'; + for my $code (0 .. 256**2) { + my $charinfo = charinfo($code) or next; + next if $charinfo->{category} =~ /^[MC]/; # ignore Marks and "other" Control chars + push @{ $charlist{$_}->{ $charinfo->{$_} } }, chr $code + for qw( script category block ); + } + 1; +} or warn "Could not include unicode groups: $@"; for (values %charlist) { for my $chars (values %{$_}) {