#6551 closed defect (fixed)

Incorrect text alignment handling of spaces around wrapping

Reported by: Stan Owned by: wraitii
Priority: Should Have Milestone: Alpha 26
Component: Core engine Keywords:
Cc: Patch: Phab:D4662

Description

Change History (1)

comment:1 by wraitii, 23 months ago

Resolution: fixed
Status: assignedclosed

In 26915:

Fix text alignment handling of spaces around wrapping.

Follows rP26889.

There is an issue with text-wrapping and word separators (aka spaces).
Because 0 A.D. collates the space after a word to the same TextCall, we occasionally need to ignore it when considering line-wrapping, because we don't want empty spaces on the right-side of right-aligned text.
However, the logic to handle this is currently broken and inconsistent.

The method introduced here uses the SFeedback structure to properly report it and generalises the checks.

Note that multiples spaces are not collapsed in 0 A.D., and for consistency the word-separator-collapsing behaviour is ignored.

Comments by: phosit, vlasdislavbelov

Fixes #6551

Differential Revision: https://code.wildfiregames.com/D4662

Note: See TracTickets for help on using tickets.