index: release v1.18 with only altgr index linked
[sheet.git] / tools / mkttfinfo
index a452389280037aa882dc0e66aa0b6094278cdb21..b14539a444f9ac750c93971885c7657d338d5f9f 100755 (executable)
@@ -1,6 +1,5 @@
 #!/usr/bin/env perl
 use 5.014;
-use strict;
 use warnings;
 
 use Data::Dump 'pp';
@@ -8,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!',
@@ -63,23 +62,23 @@ for ($outfile || ()) {
        }gx;
        $meta{os} = $_ for "@ttfext[0 .. $#ttfext-1]" || (
                $meta{copyright} =~ /\bGoogle\b/ ? "Android" :
-               $ttfname eq 'arialuni' ? 'win95' :
+               $ttfname eq 'arialuni' ? 'win2k' :
                ()
        );
        $meta{oscorp} = (
                s/^mac10/OS X 10./ ? 'Apple' :
-               s/^win/Windows / ? 'Microsoft' :
+               s/^win(.+)/'Windows '.($1 eq '2k' ? 2000 : $1)/e ? 'Microsoft' :
                m/^Android/ ? 'Google' :
                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__