summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwl <wl>2012-10-17 10:45:33 +0000
committerwl <wl>2012-10-17 10:45:33 +0000
commitf9e19e68a662ea883f12a0987d25a6d5a0943c53 (patch)
treefc88049ace766ef8a27776b386739d4b6ec19c18 /src
parentc9f8f8324c98eeba558aef47efdb2a577dd62f3a (diff)
downloadgroff-f9e19e68a662ea883f12a0987d25a6d5a0943c53.tar.gz
* src/devices/gropdf/gropdf: The command \D't N' moves horizontal
position by 'N'. gropdf now obeys this rule. Fixed kerning issue where width of non-kerned text could be wrongly calculated using previous kern factor.
Diffstat (limited to 'src')
-rw-r--r--src/devices/gropdf/gropdf.pl16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 0ed81a4a..a98e0b03 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2669,6 +2669,7 @@ sub do_D
$lwidth=$p[0];
$stream.="$p[0] w\n";
$poschg=1;
+ $xpos+=$lwidth;
}
elsif ($Dcmd eq 'a')
{
@@ -3014,6 +3015,14 @@ sub TextWid
sub do_t
{
my $par=shift;
+
+ if ($kernadjust != $curkern)
+ {
+ PutLine();
+ $stream.="$kernadjust Tc\n";
+ $curkern=$kernadjust;
+ }
+
my $wid=TextWid($par);
$par=reverse(split('',$par)) if $xrev;
@@ -3038,13 +3047,6 @@ sub do_t
# $nomove = width of char(s) added by 'C', 'N' or 'c'
# $w-flg = 'w' seen since last t
- if ($kernadjust != $curkern)
- {
- PutLine();
- $stream.="$kernadjust Tc\n";
- $curkern=$kernadjust;
- }
-
if ($fontchg)
{
PutLine();