bugBattle for Wesnoth - Bugs: bug #21649, Consecutive line breaks not...

Show feedback again

bug #21649: Consecutive line breaks not rendered as expected with Pango/Cairo (GUI2, etc.)

Submitted by:  Ignacio R. Morelle <shadowmaster>
Submitted on:  Fri 14 Feb 2014 05:28:57 AM UTC  
Category: BugSeverity: 4 - Important
Priority: 5 - NormalItem Group: User Interface
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.11.xOperating System: Windows, OS X

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Wed 26 Aug 2015 07:19:11 AM UTC, comment #4:

After seeing how the *.po language files are generated, I notice they use '\n' (presumably to render the LF character) to make lines breaks. I wonder, then, for the situations where we are not getting the expected line breaks in Windows, if anything changes if the Windows EOL format of CR-LF (that is, '\r\n') is used.

Wedge009 <wedge009>
Wed 12 Aug 2015 01:59:49 PM UTC, comment #3:

I notice that the campaign description for Legend of Wesmere is shown with the proper line breaks in the multi-player campaign window, but not the normal single-player one. It looks like they both use the same source directory (data/campaigns/Legend_of_Wesmere/)... I'm guessing the different code used in the two windows accounts for this (is this related to GUI1 vs GUI2?).

Wedge009 <wedge009>
Sat 01 Aug 2015 01:09:04 PM UTC, comment #2:

Not sure if new Pango/Cairo libraries help. Using Pango 1.37.2 and Cairo 1.14.2 on Windows results in the same single-only new-line issue.

Wedge009 <wedge009>
Sat 11 Oct 2014 11:52:04 PM UTC, comment #1:

Confirmed by mattsc that this also affects 1.11.x on OS X. He also says that 1.13.0-dev isn't affected, presumably because he's building it with newer Pango and Cairo versions.

Ignacio R. Morelle <shadowmaster>
Project Administrator
Fri 14 Feb 2014 05:28:57 AM UTC, original submission:

On Windows (but not Linux), consecutive line breaks are not rendered as expected with Pango/Cairo (via the ttext type) as used by GUI2 or story screens, making it non-trivial to ensure paragraphs of text in the same string have a minimum separation between them.

I'm attaching screenshots of one of the story screens for the first scenario of the A Tale of Two Brothers campaign as one of the most evident examples, but this problem can also be observed with all the mainline campaign descriptions featured in the Campaigns menu, where the line stating the campaign difficulty and length is separated from the rest of the description by two consecutive line breaks to form two distinct paragraphs.

Interestingly enough, there is a (unfortunately very inconvenient) way to work around this issue by inserting a single whitespace character (ASCII 0x20) for each line that would otherwise be empty, i.e. between the line breaks.

I consider this bug to be rather important since it severely impacts the ability of UMC authors to format prose in more text-heavy add-on campaigns in a form that is rendered consistently across all supported platforms.

I have only experienced this bug on Windows myself (outdated Cairo/Pango versions? see also: my note about versions on bug #21648).

Ignacio R. Morelle <shadowmaster>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by wedge009 (Posted a comment)
  • -unavailable- added by shadowmaster (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 11 Oct 2014 11:52:03 PM UTCshadowmasterOperating SystemWindows XP - 8=>Windows, OS X
    Fri 14 Feb 2014 05:28:57 AM UTCshadowmasterAttached File-=>Added wesnoth-win32-double-line-breaks.png, #20045
      Attached File-=>Added wesnoth-win32-double-line-breaks-linux-comparison.png, #20046
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup