I noticed a block of space at the end of a ui text element for which I need to wrap text. I thought maybe I had set something up wrong, so I tried changing various things but couldn’t make it go away.
Then I noticed that if I moved the right anchor of the text element, decreasing its horizontal size, the gap shrank as the size decreased. I’m wondering if this might be some kind of error in the way the text width is calculated for wrapping, though I looked at UiTextComponent::CalculateHorizontalClipOffset() but I can’t get it to hit any breakpoints in the editor or in game.
Smaller, no gap: http://i.imgur.com/iQKpksE.png
It might be important to note that I’m using “console” font, which is supposed to be a fixed-width font. It also seems that if I turn “wrap text” off and turn “clip text” on, the clipping can correctly find the edge of the element, so this does seem related to text wrapping rather than any issue with the ui setup.
This seems to be related to an interaction between whatever function is wrapping the text and the use of “console” font.
overflow, “wrap text”, console font --> Gap
“clip text”, no wrap, console font --> Works as expected
overflow, “wrap text”, default font --> Works as expected
“clip text”, no wrap, default font --> Works as expected