git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
font: mark 16th column
[sheet.git]
/
tools
/
mkttfinfo
diff --git
a/tools/mkttfinfo
b/tools/mkttfinfo
index 370ff97289204ecb7a8cc28f7324913d05f0781c..9102726bda29bb93d28bbc4170b9dc12dcd15701 100755
(executable)
--- a/
tools/mkttfinfo
+++ b/
tools/mkttfinfo
@@
-9,14
+9,14
@@
use Getopt::Long;
our $VERSION = '1.00';
our $VERSION = '1.00';
-GetOptions(my %opt,
+GetOptions(
\
my %opt,
'verbose|v!',
);
my ($ttfuri, $outfile) = @ARGV;
$ttfuri or die "usage error\n";
'verbose|v!',
);
my ($ttfuri, $outfile) = @ARGV;
$ttfuri or die "usage error\n";
-my $fontinc = $ENV{FONTINC} // '~/.fonts,/usr/share/fonts/truetype/*';
+my $fontinc = $ENV{FONTINC} // '
data/font,
~/.fonts,/usr/share/fonts/truetype/*';
if (!-e $ttfuri) {
my $found = (grep {-e} glob "{$fontinc}/$ttfuri")[0] or do {
warn "font not found: $ttfuri\n";
if (!-e $ttfuri) {
my $found = (grep {-e} glob "{$fontinc}/$ttfuri")[0] or do {
warn "font not found: $ttfuri\n";
@@
-39,8
+39,8
@@
for ($outfile || ()) {
my %meta = (
source => $ttfuri =~ m{(^/usr/.+ | [^/]+) \z}msx,
name => $ttfmeta->find_name(4) || $ttfname,
my %meta = (
source => $ttfuri =~ m{(^/usr/.+ | [^/]+) \z}msx,
name => $ttfmeta->find_name(4) || $ttfname,
- revision =>
$ttf->{head}->{fontRevision}
,
- version =>
scalar $ttfmeta->find_name(5)
,
+ revision =>
sprintf('%g', $ttf->{head}->{fontRevision})
,
+ version =>
$ttfmeta->find_name(5) =~ s/\Aversion //ri =~ s/\s+\z//r
,
copyright=> scalar $ttfmeta->find_name(0),
license => $ttfmeta->find_name(14) || undef,
date => (map {
copyright=> scalar $ttfmeta->find_name(0),
license => $ttfmeta->find_name(14) || undef,
date => (map {