GNOME Bugzilla – Bug 584586
pango_layout_set_width does not seem to work in properly Windows
Last modified: 2009-07-20 18:05:29 UTC
Please describe the problem: The following call to pango_layout_set_width() to set the width to 7.5" (for 8.5" paper with 0.5" left and right margins) works great in Linux, but in Windows the text is wrapped at about 1.7 inches: gdouble leftMargin = 0.5; gdouble rightMargin = 0.5; gdouble widthAvail = 8.5 - leftMargin - rightMargin; pango_layout_set_width(layout, (int)(widthAvail * PANGO_SCALE * 72)); This can be seen with the small test application attached with http://bugzilla.gnome.org/show_bug.cgi?id=584585. The call to pango_layout_set_width() is in function setupPrintLayout() in tstPrint.c. It has a fixed page width of 8.5" and margins are set to 0.5" in tstApp.c so the text should wrap at 7.5". Steps to reproduce: 1. Execute the test application attached to http://bugzilla.gnome.org/show_bug.cgi?id=584585. 2. Enter a long string of short words, click Print and look at the printed text. Actual results: In Windows the printed text is wrapped at about 1.7". In Linux it wraps at 7.5". Expected results: It should wrap at 7.5" in all cases. Does this happen every time? Yes Other information:
Your code has a section in "#ifdef _WIN32" which is clearly changing the margins on win32. How do you expect it to work like on Linux then?!