font: recognise category mark in mkfontinfo coverage
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 30 Jan 2024 17:26:25 +0000 (18:26 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sun, 11 Feb 2024 06:39:57 +0000 (07:39 +0100)
Assume \pM marks are no less significant than other letters, and certainly
should be counted in script coverage, especially for Indian support.
Significantly affects Hebrew (missing cantillation diacritics drop
previously complete fonts to 70%).

tools/mkfontinfo

index da6fd67f681a57420b95a8a1e912fda27ea9d3f5..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;
 
@@ -76,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} <= $_)