X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e316fc14bef26f958937aec0e6854b61f71a3b34..09dded3d8606e8e4406fffcf477ceb4a1c97fee2:/font-optimizer/convert-eot.pl diff --git a/font-optimizer/convert-eot.pl b/font-optimizer/convert-eot.pl deleted file mode 100755 index a5a1672..0000000 --- a/font-optimizer/convert-eot.pl +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use lib 'ext/Font-TTF/lib'; -use Font::TTF::Font; -use Font::EOTWrapper; - -use Getopt::Long; - -main(); - -sub help { - print < \$verbose, - 'ttf-to-eot' => \$ttf_to_eot, - 'eot-to-ttf' => \$eot_to_ttf, - ) or help(); - - @ARGV == 2 or help(); - - my ($input_file, $output_file) = @ARGV; - - if ($ttf_to_eot and $eot_to_ttf) { - help(); - } - - if (not ($ttf_to_eot or $eot_to_ttf)) { - if ($input_file =~ /\.[ot]tf$/i and $output_file =~ /\.eot$/i) { - $ttf_to_eot = 1; - } elsif ($input_file =~ /\.eot$/i and $output_file =~ /\.[ot]tf$/i) { - $eot_to_ttf = 1; - } else { - help(); - } - } - - if ($ttf_to_eot) { - Font::EOTWrapper::convert($input_file, $output_file); - } elsif ($eot_to_ttf) { - Font::EOTWrapper::extract($input_file, $output_file); - } -}