You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

122 lines
3.6 KiB

Index: convert-eot.pl
--- convert-eot.pl.orig 2011-01-18 15:12:08.000000000 +0100
+++ convert-eot.pl 2013-12-30 17:38:22.142046736 +0100
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
+#!@l_prefix@/bin/perl
use strict;
use warnings;
-use lib 'ext/Font-TTF/lib';
+use lib '@l_prefix@/lib/font-optimizer';
use Font::TTF::Font;
use Font::EOTWrapper;
Index: list-features.pl
--- list-features.pl.orig 2011-01-18 15:12:08.000000000 +0100
+++ list-features.pl 2013-12-30 17:38:22.142046736 +0100
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
+#!@l_prefix@/bin/perl
use strict;
use warnings;
-use lib 'ext/Font-TTF/lib';
+use lib '@l_prefix@/lib/font-optimizer';
use Font::TTF::Font;
use Getopt::Long;
Index: modify-names.pl
--- modify-names.pl.orig 2011-01-18 15:12:08.000000000 +0100
+++ modify-names.pl 2013-12-30 17:39:26.972230443 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -CA
+#!@l_prefix@/bin/perl -CA
# use the -CA flag so @ARGV is interpreted as UTF-8
use strict;
@@ -6,7 +6,7 @@
binmode STDOUT, ':utf8';
-use lib 'ext/Font-TTF/lib';
+use lib '@l_prefix@/lib/font-optimizer';
use Font::TTF::Font;
my @name_strings = qw(
@@ -53,6 +53,7 @@
Any sequence of the following commands:
--print print the font's current name strings
--set [name] [string] replace the name string's value
+ --prepend [name] [string] prepend to the name string's value
--append [name] [string] append to the name string's value
--subst [name] [string1] [string2] replace all occurrences of [string1]
with [string2] in the name string's value
@@ -87,7 +88,7 @@
}
}
if (not $exists) {
- warn "Can't find existing name string '$name_strings[$id]' ($id)\n";
+ warn "WARNING: Can't find existing name string '$name_strings[$id]' ($id)\n";
}
}
@@ -147,6 +148,11 @@
my $id = parse_id(shift @args);
my $val = shift @args;
push @commands, [ 'set', $id, $val ];
+ } elsif ($_ eq '--prepend') {
+ @args >= 2 or help();
+ my $id = parse_id(shift @args);
+ my $val = shift @args;
+ push @commands, [ 'prepend', $id, $val ];
} elsif ($_ eq '--append') {
@args >= 2 or help();
my $id = parse_id(shift @args);
@@ -181,6 +187,13 @@
print "Setting string $id (platform=$plat encoding=$enc lang=$lang)\n" if $verbose;
return $cmd->[2];
});
+ } elsif ($cmd->[0] eq 'prepend') {
+ my $id = $cmd->[1];
+ modify_name($font, $id, sub {
+ my ($val, $plat, $enc, $lang) = @_;
+ print "Prepending to string $id (platform=$plat encoding=$enc lang=$lang)\n" if $verbose;
+ return $cmd->[2] . $val;
+ });
} elsif ($cmd->[0] eq 'append') {
my $id = $cmd->[1];
modify_name($font, $id, sub {
Index: obfuscate-font.pl
--- obfuscate-font.pl.orig 2011-01-18 15:12:08.000000000 +0100
+++ obfuscate-font.pl 2013-12-30 17:38:22.142046736 +0100
@@ -1,9 +1,9 @@
-#!/usr/bin/perl
+#!@l_prefix@/bin/perl
use strict;
use warnings;
-use lib 'ext/Font-TTF/lib';
+use lib '@l_prefix@/lib/font-optimizer';
use Font::TTF::Font;
use Getopt::Long;
Index: subset.pl
--- subset.pl.orig 2011-01-18 15:12:08.000000000 +0100
+++ subset.pl 2013-12-30 17:38:22.142046736 +0100
@@ -1,10 +1,10 @@
-#!/usr/bin/perl -CA
+#!@l_prefix@/bin/perl -CA
# use the -CA flag so @ARGV is interpreted as UTF-8
use strict;
use warnings;
-use lib 'ext/Font-TTF/lib';
+use lib '@l_prefix@/lib/font-optimizer';
use Font::Subsetter;
use Getopt::Long;