Tabs cause rendered line overflow in block formatting

Issue #645 resolved
prl created an issue

If <TAB> ("\t") is used in a text item with halign="block", it causes the line of rendered text that contains the tab (or tabs) to overflow the available width.

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="Tab bug: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\na\tincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris..."/>

The display is as in the image below: the end position for justification is not correctly adjusted for the tab, and the line is justified so that its end "[do]lore magna" lies outside the right boundary of its text box.

render-tab-bug.png

Comments (1)

  1. Peter Urbanec

    Fix bug #645: Tabs cause rendered line overflow in block formatting

    Add a GS_FIXED glyph flag to mark that a glyph should not be moved during justification.

    Justify the part of the line after the last GS_FIXED glyph, or from the start of the line if there is no GS_FIXED glyph.

    If GS_ISFIRST is set in nextflags, don't set GS_FIXED in it.

    → <<cset 881c96fcd587>>

  2. Log in to comment