diff options
author | wl <wl> | 2013-07-31 20:19:56 +0000 |
---|---|---|
committer | wl <wl> | 2013-07-31 20:19:56 +0000 |
commit | 71c84038822aae6954f01a7804d5aa8cca8af7bb (patch) | |
tree | 8b789e69ef9a6942d1f13daceb73e7577c3e2dda | |
parent | 0c50ce0ddd75f5c7dc6c53e02c69e84fa90a2814 (diff) | |
download | groff-71c84038822aae6954f01a7804d5aa8cca8af7bb.tar.gz |
Fix overprinting issue with Acrobat reader.
Problem reported by Heinz-Jürgen Oertel <hj.oertel@t-online.de>.
* src/devices/gropdf/gropdf.pl (do_t, FindChar): Use ascii octal
notation (i.e., \015) when outputting characters with value < 32.
This fixes a bug which affected acroread when control-M (cr) was
embedded in a text string.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | src/devices/gropdf/gropdf.pl | 4 |
2 files changed, 13 insertions, 2 deletions
@@ -1,3 +1,14 @@ +2013-07-31 Deri James <deri@chuzzlewit.myzen.co.uk> + + Fix overprinting issue with Acrobat reader. + + Problem reported by Heinz-Jürgen Oertel <hj.oertel@t-online.de>. + + * src/devices/gropdf/gropdf.pl (do_t, FindChar): Use ascii octal + notation (i.e., \015) when outputting characters with value < 32. + This fixes a bug which affected acroread when control-M (cr) was + embedded in a text string. + 2013-07-16 Werner LEMBERG <wl@gnu.org> * tmac/fallbacks.tmac: Make it work in compatibility mode. diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl index 078ebf23..92b37878 100644 --- a/src/devices/gropdf/gropdf.pl +++ b/src/devices/gropdf/gropdf.pl @@ -3068,7 +3068,7 @@ sub do_t $xpos+=($pendmv-$nomove)/$unitwidth; $stream.="% == '$par'=$wid 'xpos=$xpos\n" if $debug; - $par=~s/\\/\\\\/g; + $par=~s/\\(?!\d\d\d)/\\\\/g; $par=~s/\)/\\)/g; $par=~s/\(/\\(/g; @@ -3198,7 +3198,7 @@ sub FindChar my $ch=$fnt->{GNM}->{$chnm}; $ch=RemapChr($ch,$fnt,$chnm) if ($ch > 255); - return(chr($ch),$fnt->{WID}->[$ch]*$cftsz); + return(($ch<32)?sprintf("\\%03o",$ch):chr($ch),$fnt->{WID}->[$ch]*$cftsz); } else { |