deri pushed a commit to branch master
in repository groff.
commit 4886b57816841de32c51b88ccffc9580b07bb535
Author: Deri James <[email protected]>
AuthorDate: Wed May 8 22:23:28 2024 +0100
[gropdf] \X'pdf: xrev' has issues.
* src/devices/gropdf/gropdf: Fails if point size not = 10, in
a number of ways.
* src/devices/gropdf/gropdf.1.man: Clarify exact operation of
'xrev'.
---
src/devices/gropdf/gropdf.1.man | 6 ++----
src/devices/gropdf/gropdf.pl | 12 +++++++-----
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index cc1971858..04e5799a5 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -977,10 +977,8 @@ height.
.B \[rs]X\[aq]pdf: xrev\[aq]
Toggle the reversal of glyph direction.
.
-This feature works \[lq]letter by letter\[rq],
-that is,
-each letter in a word is reversed left-to-right,
-not the entire word.
+This feature works by reversing all following text.
+Each separate letter is also mirrored.
.
One application is the reversal of glyphs in the Zapf Dingbats font.
.
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 800af64c3..74d32a5d7 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -4088,11 +4088,11 @@ sub PutLine
my $len=0;
my $rev=0;
- if (($lin[0]->[CHR]||0) < 0)
+ if ($xrev)
{
- $len=($lin[$#lin]->[XPOS]-$lin[0]->[XPOS]+$lin[$#lin]->[HWID])*100;
- $s.=d3($len).' ';
- $rev=1;
+
$len=($lin[$#lin]->[XPOS]-$lin[0]->[XPOS]+$lin[$#lin]->[HWID])*1000/$cftsz;
+ $s.=d3($len).' ' if $len;
+ $rev=1;
}
$stream.="%! wht0sz=".d3($whtsz/$unitwidth).",
wt=".((defined($wt))?d3($wt/$unitwidth):'--')."\n" if $debug;
@@ -4157,7 +4157,7 @@ sub PutLine
if ($rev)
{
$s.=') ' if !$n;
- $s.=d3(($c->[CWID]-$c->[HWID])*100).' (';
+ $s.=d3(($c->[CWID]-$c->[HWID])*1000/$cftsz).' (';
$n=0;
}
@@ -4331,11 +4331,13 @@ sub PutGlyph
{
MakeMatrix(1);
$inxrev=1;
+ $#lin=-1;
}
elsif ($inxrev and $cn > 0)
{
MakeMatrix(0);
$inxrev=0;
+ $#lin=-1;
}
if ($matrixchg or $poschg)
_______________________________________________
Groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit