deri pushed a commit to branch master in repository groff. commit 6b2942c79f5dd34883f450a2947f611a11b085d3 Author: Deri James <d...@chuzzlewit.myzen.co.uk> Date: Sun Nov 12 17:44:37 2017 +0000
gropdf should load ALL 'download' files * src/devices/gropdf/gropdf.pl: only the first 'download' file found was loaded, it should load all found. --- ChangeLog | 7 +++++++ src/devices/gropdf/gropdf.pl | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6fe7f77..996da7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-11-12 Deri James <d...@chuzzlewit.myzen.co.uk> + + gropdf should load ALL 'download' files + + * src/devices/gropdf/gropdf.pl: only the first 'download' file + found was loaded, it should load all found. + 2017-11-12 G. Branden Robinson <g.branden.robin...@gmail.com> * src/libs/libxutil/DviChar.c: Initialize "buckets" field of diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 4d21580..ad644e4 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -18,7 +18,7 @@ # for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. use strict; use Getopt::Long qw(:config bundling); @@ -542,26 +542,36 @@ sub Load_Config sub LoadDownload { my $f; + my $found=0; - OpenFile(\$f,$fontdir,"download"); - Msg(1,"Failed to open 'download'") if !defined($f); + my (@dirs)=split($cfg{RT_SEP},$fontdir); - while (<$f>) + foreach my $dir (@dirs) { - chomp; - s/#.*$//; - next if $_ eq ''; - my ($foundry,$name,$file)=split(/\t+/); - if (substr($file,0,1) eq '*') + $f=undef; + OpenFile(\$f,$dir,"download"); + next if !defined($f); + $found++; + + while (<$f>) { - next if !$embedall; - $file=substr($file,1); + chomp; + s/#.*$//; + next if $_ eq ''; + my ($foundry,$name,$file)=split(/\t+/); + if (substr($file,0,1) eq '*') + { + next if !$embedall; + $file=substr($file,1); + } + + $download{"$foundry $name"}=$file; } - $download{"$foundry $name"}=$file; + close($f); } - close($f); + Msg(1,"Failed to open 'download'") if !$found; } sub OpenFile @@ -3281,7 +3291,7 @@ sub RemapChr } if (--$unused <= 255) - { + { $fnt->{GNM}->{$chnm}=$unused++; $fnt->{GNO}->[$unused]=$fnt->{GNO}->[$ch+1]; $fnt->{WID}->[$unused]=$fnt->{WID}->[$ch]; @@ -3312,11 +3322,11 @@ sub do_N if ($par > 255) { - my $fnt=$fontlst{$cft}->{FNT}; + my $fnt=$fontlst{$cft}->{FNT}; my $chnm=''; foreach my $c (keys %{$fnt->{GNM}}) - { + { $chnm=$c,last if $fnt->{GNM}->{$c} == $par; } _______________________________________________ Groff-commit mailing list Groff-commit@gnu.org https://lists.gnu.org/mailman/listinfo/groff-commit