font: coverage data as cover array in primary hash
[sheet.git] / tools / mkttfinfo
index 8cfe446a2b63e295bc5b714e170e894226d2561b..b14539a444f9ac750c93971885c7657d338d5f9f 100755 (executable)
@@ -7,7 +7,7 @@ use Font::TTF::Font;
 use Getopt::Long;
 use Cwd 'abs_path';
 
-our $VERSION = '1.01';
+our $VERSION = '1.02';
 
 GetOptions(\my %opt,
        'verbose|v!',
@@ -72,13 +72,13 @@ for ($outfile || ()) {
                undef
        ) for $meta{os} || ();
 
-       say "# automatically generated by $0";
-       say '+', pp(\%meta), ',';
-
        my $support = $ttf->{cmap}->find_ms->{val};
        warn scalar keys %$support, " characters read from $ttfuri\n"
                if $opt{verbose};
-       say pp(sort { $a <=> $b } keys %$support);
+       $meta{cover} = [sort { $a <=> $b } keys %$support];
+
+       say "# automatically generated by $0";
+       say '+', pp(\%meta);
 }
 
 __END__