Bug 990228 - cpi broken again
cpi broken again
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: paps (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Akira TAGOH
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 988909
  Show dependency treegraph
 
Reported: 2013-07-30 11:42 EDT by Tim Waugh
Modified: 2013-08-14 22:55 EDT (History)
2 users (show)

See Also:
Fixed In Version: paps-0.6.8-26.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-14 22:44:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
replacement paps-fix-tab-width.patch (2.40 KB, patch)
2013-07-30 11:50 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2013-07-30 11:42:09 EDT
Description of problem:
When cpi is used and the input has over-width characters, all the output characters are piled up on top of one another.

Version-Release number of selected component (if applicable):
paps-0.6.8-25.fc19

How reproducible:
100%

Steps to Reproduce:
1.echo "проверка test テスト" > input
2.paps --cpi 10 input > output.ps
3.View output.ps

Actual results:
Characters on top of one another.

Expected results:
Characters written left-to-right.
Comment 1 Tim Waugh 2013-07-30 11:50:28 EDT
Created attachment 780728 [details]
replacement paps-fix-tab-width.patch

Here's a replacement for paps-fix-tab-width.patch which undoes the breakage, although the output doesn't exactly look great.

Interdiff:

--- b/src/libpaps.c
+++ b/src/libpaps.c
@@ -448,9 +448,9 @@
 
 	  if (paps->cpi > 0.0L)
 	    {
-	      int n = geometry.width / avg_width;
+	      double n = ((double)geometry.width) / avg_width;
 
-	      x_pos += ((double)n) * (1 / paps->cpi * 72.0);
+	      x_pos += n * (1 / paps->cpi * 72.0);
 	    }
 	  else
 	    {
Comment 3 Fedora Update System 2013-07-31 04:37:03 EDT
paps-0.6.8-26.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/paps-0.6.8-26.fc19
Comment 4 Fedora Update System 2013-07-31 04:42:03 EDT
paps-0.6.8-26.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/paps-0.6.8-26.fc18
Comment 5 Fedora Update System 2013-08-01 23:38:19 EDT
Package paps-0.6.8-26.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing paps-0.6.8-26.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13993/paps-0.6.8-26.fc19
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2013-08-14 22:44:25 EDT
paps-0.6.8-26.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2013-08-14 22:55:40 EDT
paps-0.6.8-26.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.