X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=update-xfonts-traditional;h=895be6d5671bcda3db31455eccac0c2da3373572;hb=124ca7f7f52c42e7e097a56c14832cd00922b26d;hp=2e8c0d7888b628307175ad867f09f23822cd6e9f;hpb=bd7891126edbe8500e813f10a78082b27156faef;p=xfonts-traditional.git diff --git a/update-xfonts-traditional b/update-xfonts-traditional index 2e8c0d7..895be6d 100755 --- a/update-xfonts-traditional +++ b/update-xfonts-traditional @@ -23,6 +23,8 @@ our $verbose=0; our $reportfh; our $foundryinfo; our %props; +our $tolerate_bad_fonts=1; +our $always_reprocess; our $wanted_parallel; sub reportloaded { @@ -259,6 +261,15 @@ sub processpcfgz ($$$$) { return !$st || $ch->{SigOK}{($st & ~128)}; }; + if ($tolerate_bad_fonts && + $r eq 'no bdf data' && + $st_isok->($ch{'gunzip'}) && + ($ch{'pcf2bdf'}{St} & ~128) == 6) + { + $r = "pcf2bdf failed ($ch{'pcf2bdf'}{St})"; + print STDERR "warning: $r: skipping $inpcfgz\n"; + $ch{'pcf2bdf'}{SigOK}{6} = 1; + } foreach my $ch (@children) { if (!$st_isok->($ch)) { die "update-xfonts-traditional:". @@ -277,14 +288,17 @@ sub processfontdir ($) { return; } my $changed = 0; - my $olddone = do "$fontdir/$donefile"; - if (!$olddone) { - die "$fontdir $! $@ " unless $!==&ENOENT; - } elsif ($olddone->{''} ne $foundryinfo) { - our $repro_reported; - print $reportfh "reprocessing fonts (rules updated)\n" or die $! - unless $repro_reported++; - $olddone = undef; + my $olddone; + if (!$always_reprocess) { + $olddone = do "$fontdir/$donefile"; + if (!$olddone) { + die "$fontdir $! $@ " unless $!==&ENOENT; + } elsif ($olddone->{''} ne $foundryinfo) { + our $repro_reported; + print $reportfh "reprocessing fonts (rules updated)\n" or die $! + unless $repro_reported++; + $olddone = undef; + } } if (!$olddone) { $olddone = { }; @@ -443,6 +457,8 @@ our (@options)=( 'share-dir=s' => \$sharedir, 'verbose|v+' => \$verbose, 'j|parallel=i' => \$wanted_parallel, + 'always-reprocess!' => \$always_reprocess, + 'tolerate-bad-fonts!' => \$tolerate_bad_fonts, ); sub define_mode ($$) {