summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Dupont <sdupont@mandriva.com>2001-10-11 14:22:42 +0000
committerSebastien Dupont <sdupont@mandriva.com>2001-10-11 14:22:42 +0000
commitdb3d4c3108cdb9af57594db607a538c7366f6132 (patch)
tree8faa21c5a992a7cf0ea0fe4cf132b60683024b4c
parentbfd216c484f14b1cc5da729d828fe7836a3a0b3a (diff)
downloaddrakx-backup-do-not-use-db3d4c3108cdb9af57594db607a538c7366f6132.tar
drakx-backup-do-not-use-db3d4c3108cdb9af57594db607a538c7366f6132.tar.gz
drakx-backup-do-not-use-db3d4c3108cdb9af57594db607a538c7366f6132.tar.bz2
drakx-backup-do-not-use-db3d4c3108cdb9af57594db607a538c7366f6132.tar.xz
drakx-backup-do-not-use-db3d4c3108cdb9af57594db607a538c7366f6132.zip
improved
-rwxr-xr-xperl-install/standalone/drakfont24
1 files 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();