From db3d4c3108cdb9af57594db607a538c7366f6132 Mon Sep 17 00:00:00 2001 From: Sebastien Dupont Date: Thu, 11 Oct 2001 14:22:42 +0000 Subject: improved --- perl-install/standalone/drakfont | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont index 9adb00721..e1a5e464e 100755 --- a/perl-install/standalone/drakfont +++ b/perl-install/standalone/drakfont @@ -155,7 +155,6 @@ sub search_windows_font { } - sub is_a_font { local $_ = $_[0]; /.ttf$/i || /.pfa$/i || /.pfb$/i || /.pcf$/i || /.pcf.gz$/i; @@ -192,17 +191,12 @@ sub search_dir_font_uninstall { my @font_list_tmp = (); my $fn = $_; if ( -d $fn ) { - foreach my $i (all($fn)) { - if (($i =~ /.ttf$/i) || ($i =~ /.pfa$/i) || ($i =~ /.pfb$/i) || ($i =~ /.pcf$/i) || ($i =~ /.pcf.gz$/i)) { - push @font_list_tmp, "$i"; - } - } - } - else { - if (($fn =~ /.ttf$/i) || ($fn =~ /.pfa$/i) || ($fn =~ /.pfb$/i) || ($fn =~ /.pcf$/i) || ($fn =~ /.pcf.gz$/i)) { - push @font_list_tmp, "$fn"; + foreach my $i (all($fn)) { + if (is_a_font($i)) { push @font_list_tmp, "$i"; } } } + else { if (is_a_font($fn)) { push @font_list_tmp, "$fn"; } + } foreach my $i (@installed_fonts_full_path) { foreach my $j (@font_list_tmp) { if ( $i =~ /$j/) { push @font_list, "$i" ;} @@ -218,6 +212,15 @@ sub put_font_dir { mkdir_p($drakfont_dir); cp_af(@font_list, $drakfont_dir); system ("cd $drakfont_dir && type1inst && chkfontpath -a $drakfont_dir"); + # xlsfonts | less pour verifier l'installation des polices. +} + + +sub remove_fonts { +# rm_rf(@) + mkdir_p($drakfont_dir); + cp_af(@font_list, $drakfont_dir); + system ("cd $drakfont_dir && type1inst && chkfontpath -a $drakfont_dir"); # xlsfonts | less pour verifier l'installation des polices. } @@ -239,7 +242,6 @@ sub backend_mod { print "\n...............The End...................\n"; } - #TODO : test directly @install if (@install) { print ".......Install Specifics Fonts...........\n\n"; search_installed_fonts(); -- cgit v1.2.1