From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.9) Gecko/20070131 Fedora/1.5.0.9-2.fc6 Firefox/1.5.0.9 pango-text Description of problem: I have a text document I was trying to print at 17cpi. The document was regularly having it's lines broken at 80 columns, even with wrapping turned off. I tracked the problem to paps. The lines are broken at the first space preceding 80 columns. The problem seems to be related to the use of pango. The following hack worked around the problem. A seemingly related problem has to do with crlf line termination. If lines are terminated with crlf, the line length seems to be mis-calculated and will insert extra lines. Version-Release number of selected component (if applicable): paps-0.6.6-19 How reproducible: Always Steps to Reproduce: 1. Start with a 132 column text file. Normal word breaks, crlf terminated lines. 2. paps --cpi=17 --left-margin=18 --right-margin=18 --paper=letter {filename.txt} >foo.ps 3. ggv foo.ps Actual Results: The lines are printed at 17 cpi but are broken at the first word break before 80 columns. Expected Results: The lines should have extended to the full 132 columns. Additional info: The following ugly hack cured the problem: *** old/paps.c 2007-04-19 15:44:58.000000000 -0700 --- new/paps.c 2007-04-19 15:45:12.000000000 -0700 *************** *** 754,759 **** --- 754,760 ---- } /* the amount of characters to be able to put on the line against CPI */ n = page_layout->column_width / 72.0 * cpi; + if (len > n) { len = wcslen (wtext); *************** *** 787,792 **** --- 788,794 ---- exit(1); } + pango_layout_set_width (para->layout, -1); pango_layout_set_text (para->layout, newtext, -1); pango_layout_get_extents (para->layout, &ink_rect, &logical_rect); /* update paint_width to wrap_against CPI */ *************** *** 796,807 **** } g_free (wtext); } pango_layout_set_text (para->layout, para->text, para->length); pango_layout_set_justify (para->layout, page_layout->do_justify); pango_layout_set_alignment (para->layout, page_layout->pango_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); ! pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); if (page_layout->do_wordwrap) pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); para->height = 0; --- 798,811 ---- } g_free (wtext); } + if ( para->text[para->length-1] == '\r' && para->length > 0) para->length--; + pango_layout_set_width (para->layout, -1); pango_layout_set_text (para->layout, para->text, para->length); pango_layout_set_justify (para->layout, page_layout->do_justify); pango_layout_set_alignment (para->layout, page_layout->pango_dir == PANGO_DIRECTION_LTR ? PANGO_ALIGN_LEFT : PANGO_ALIGN_RIGHT); ! //pango_layout_set_width (para->layout, paint_width * PANGO_SCALE); if (page_layout->do_wordwrap) pango_layout_set_wrap (para->layout, PANGO_WRAP_WORD_CHAR); para->height = 0;
should be fixed in 0.6.8-1.fc9. please check with it and will backport the fix to other versions then.
pushed the update for FC-6, F-7 and F-8.
Fedora apologizes that these issues have not been resolved yet. We're sorry it's taken so long for your bug to be properly triaged and acted on. We appreciate the time you took to report this issue and want to make sure no important bugs slip through the cracks. If you're currently running a version of Fedora Core between 1 and 6, please note that Fedora no longer maintains these releases. We strongly encourage you to upgrade to a current Fedora release. In order to refocus our efforts as a project we are flagging all of the open bugs for releases which are no longer maintained and closing them. http://fedoraproject.org/wiki/LifeCycle/EOL If this bug is still open against Fedora Core 1 through 6, thirty days from now, it will be closed 'WONTFIX'. If you can reporduce this bug in the latest Fedora version, please change to the respective version. If you are unable to do this, please add a comment to this bug requesting the change. Thanks for your help, and we apologize again that we haven't handled these issues to this point. The process we are following is outlined here: http://fedoraproject.org/wiki/BugZappers/F9CleanUp We will be following the process here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this doesn't happen again. And if you'd like to join the bug triage team to help make things better, check out http://fedoraproject.org/wiki/BugZappers
This bug was actually on MODIFIED state. so closing.