index: release v1.18 with only altgr index linked
[sheet.git] / tools / mkfontinfo
index 95330255001f3a1e9061c37688cb89b2f52dc5e6..0b669d4ca99b4d903bdccd6dbe3fa7c99d0309f3 100755 (executable)
@@ -7,7 +7,7 @@ use open OUT => ':encoding(utf-8)', ':std';
 use File::Basename 'basename';
 use Data::Dump 'pp';
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 my @fontlist;
 
@@ -28,7 +28,8 @@ for my $fontfile (glob 'data/font/*'.$incsuffix) {
                (map { "($_)" } $year || ()),
        );
        push @fontlist, $fontmeta;
-       $cover{$fontid} = { map { (chr $_ => 1) } @fontrange };
+       my $fontrange = $fontmeta->{cover};
+       $cover{$fontid} = { map { (chr $_ => 1) } $fontmeta->{cover}->@* };
 }
 
 my %charlist;
@@ -75,7 +76,7 @@ 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
+               next if $charinfo->{category} =~ /^[C]/;  # ignore "other" Control chars
                push @{ $charlist{$_}->{ $charinfo->{$_} } }, chr $code
                        for qw( script category block );
                push @{ $charlist{version}->{$_} }, (chr $code) x ($agemap->{$code} <= $_)