git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keyboard/altgr: label keys in each row with big class
[sheet.git]
/
tools
/
mkttfinfo
diff --git
a/tools/mkttfinfo
b/tools/mkttfinfo
index a452389280037aa882dc0e66aa0b6094278cdb21..b14539a444f9ac750c93971885c7657d338d5f9f 100755
(executable)
--- a/
tools/mkttfinfo
+++ b/
tools/mkttfinfo
@@
-1,6
+1,5
@@
#!/usr/bin/env perl
use 5.014;
#!/usr/bin/env perl
use 5.014;
-use strict;
use warnings;
use Data::Dump 'pp';
use warnings;
use Data::Dump 'pp';
@@
-8,7
+7,7
@@
use Font::TTF::Font;
use Getopt::Long;
use Cwd 'abs_path';
use Getopt::Long;
use Cwd 'abs_path';
-our $VERSION = '1.0
1
';
+our $VERSION = '1.0
2
';
GetOptions(\my %opt,
'verbose|v!',
GetOptions(\my %opt,
'verbose|v!',
@@
-63,23
+62,23
@@
for ($outfile || ()) {
}gx;
$meta{os} = $_ for "@ttfext[0 .. $#ttfext-1]" || (
$meta{copyright} =~ /\bGoogle\b/ ? "Android" :
}gx;
$meta{os} = $_ for "@ttfext[0 .. $#ttfext-1]" || (
$meta{copyright} =~ /\bGoogle\b/ ? "Android" :
- $ttfname eq 'arialuni' ? 'win
95
' :
+ $ttfname eq 'arialuni' ? 'win
2k
' :
()
);
$meta{oscorp} = (
s/^mac10/OS X 10./ ? 'Apple' :
()
);
$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} || ();
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};
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__
}
__END__