summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfont
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-20 13:38:10 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-20 13:38:10 +0000
commit57ade802654490078b19586421a813bf381d8961 (patch)
tree0bab4b13ff29e802be79030ae9c8c11d813147f3 /perl-install/standalone/drakfont
parenta872c0494fdabc1bd0235cce254d15da32eb6942 (diff)
downloaddrakx-backup-do-not-use-57ade802654490078b19586421a813bf381d8961.tar
drakx-backup-do-not-use-57ade802654490078b19586421a813bf381d8961.tar.gz
drakx-backup-do-not-use-57ade802654490078b19586421a813bf381d8961.tar.bz2
drakx-backup-do-not-use-57ade802654490078b19586421a813bf381d8961.tar.xz
drakx-backup-do-not-use-57ade802654490078b19586421a813bf381d8961.zip
try to simplify
Diffstat (limited to 'perl-install/standalone/drakfont')
-rwxr-xr-xperl-install/standalone/drakfont33
1 files changed, 11 insertions, 22 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index 4c993ac74..c06188c66 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -344,35 +344,24 @@ sub put_font_dir() {
interactive_progress($pbar2, 0.10, N("True Type install done"));
my $update_chkfontpath = "$chkfontpath -a $drakfont_dir/ttf";
- if ($so && $gs) {
- my @glob_drak = glob("$drakfont_dir/tmp/tmp/*.ttf");
- convert_ttf_fonts(\@glob_drak, 1);
- system("cd $drakfont_dir/tmp/tmp && mv *.gsf *.pfb *.pfm *.afm ../Type1");
- system("cd $drakfont_dir/tmp/Type1 && $type1inst");
- interactive_progress($pbar2, 0.10, N("type1inst building"));
- -e "$drakfont_dir/tmp/Type1/Fontmap"
- and system("cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` ");
- system("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.gsf *.afm *.pfb ../../Type1 ");
- my $type1dir = $drakfont_dir . "/Type1";
- system("cd $type1dir && $fccache && $type1inst");
- interactive_progress($pbar2, 0.05, N("Ghostscript referencing"));
- $update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1";
- }
-
- if (!$so && $gs) {
+ if ($gs) {
convert_ttf_fonts([ glob("$drakfont_dir/tmp/tmp/*.ttf") ], 1);
- system("cd $drakfont_dir/tmp/tmp && mv *.gsf *.pfb *.pfm ../Type1");
+ system(join("cd $drakfont_dir/tmp/tmp && mv *.gsf *.pfb *.pfm", if_($so, "*.afm"), "../Type1"));
system("cd $drakfont_dir/tmp/Type1 && $type1inst");
interactive_progress($pbar2, 0.1, N("type1inst building"));
- system("cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` ");
- system("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.afm *.gsf *.pfb ../../Type1 ");
+ if ($so) {
+ -e "$drakfont_dir/tmp/Type1/Fontmap"
+ and system("cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` ");
+ system("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.gsf *.afm *.pfb ../../Type1 ");
+ } else {
+ system("cd $drakfont_dir/tmp/Type1 && cat Fontmap >> `rpm -ql ghostscript | grep Fontmap.GS` ");
+ system("cd $drakfont_dir/tmp/Type1 && mv *.pfm *.afm *.gsf *.pfb ../../Type1 ");
+ }
my $type1dir = $drakfont_dir . "/Type1";
system("cd $type1dir && $fccache && $type1inst");
interactive_progress($pbar2, 0.05, N("Ghostscript referencing"));
$update_chkfontpath .= "; $chkfontpath -a $drakfont_dir/Type1";
- }
-
- if ($so && !$gs) {
+ } elsif ($so) {
convert_ttf_fonts([ glob("$drakfont_dir/tmp/tmp/*.ttf") ]);
convert_fonts([ glob("$drakfont_dir/tmp/tmp/*.pfm") ], $pfm2afm, "PFM");
system("cd $drakfont_dir/tmp/tmp && mv *.afm ../Type1");