Non-printing character before LF causes block formatting error

Issue #641 resolved
prl created an issue

If a non-printing character (e.g. <CR>, <SPACE> is considered a printing character) immediately precedes a <LF> character ("\n") in a text item with halign="block", the line containing the <LF> is justified when it should not be.

Replication steps

Insert the following in any skin screen large enough to accommodate it:

            <eLabel position="100,100" size="500,100" font="Regular;18" foregroundColor="white" halign="block" transparent="1" zPosition="20" text="&lt;CR&gt;&lt;LF&gt; bug: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\r\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris..."/>

The display is as in the image below: it justifies the line "adipiscing...tempor" when it should not. render-cr-lf-bug.png

This bug can also be seen in OverlayHD skin in IceTV EPGs and event informatin screens where "<CR><LF>" is used as a line separator in the IceTV event description.

Comments (2)

  1. Peter Urbanec

    Fix bug #641: Non-printing character before LF causes block formatting error

    Remove code that does a single (logical) character lookahead for a newline. Instead, use the nextflags GS_FIRST flag to set the GS_LF flag on the previous printable character (if there is one) when a newline characted is found in the case statement.

    → <<cset e24451d7cb89>>

  2. Log in to comment