X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/2b249e3c605336c96f189266dc0db91998491449..5f4bdebe887e0d75a9db49bd98631e8df78b015d:/tools/mkfontinfo diff --git a/tools/mkfontinfo b/tools/mkfontinfo index 3be474c..1019043 100755 --- a/tools/mkfontinfo +++ b/tools/mkfontinfo @@ -18,6 +18,12 @@ for my $fontfile (glob 'ttfsupport/*'.$incsuffix) { my ($fontid) = basename($fontfile, $incsuffix); my ($fontmeta, @fontrange) = do $fontfile or next; $fontmeta->{file} = $fontid; + my $year = substr $fontmeta->{date}, 0, 4; + $fontmeta->{description} = join(' ', + (map { "version $_" } $fontmeta->{version} || ()), + $fontmeta->{version} && $fontmeta->{version} =~ /\Q$year/ ? () : + (map { "($_)" } $year || ()), + ); push @fontlist, $fontmeta; $cover{$fontid} = { map { (chr $_ => 1) } @fontrange }; } @@ -57,13 +63,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*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 %{$_}) {