I’m currently trying to archive something like a termnial monitor.
For that I have a TextBlock representing the whole terminal. That text contains exactly as much Lines as the “terminal height” and each line is filled with white space to fill the “terminal width”. I also use a mono space font so the cordinates wont misalign after some time.
This TextBlock now sits in a Scale Box so I can handle any kind of terminal size and aspect ratios.
The problem now is, when i display that text, it still clips a little bit on each edge.
More weird is though, in the editor, this changed depending on how much you zoom. The text size relative to the block size changes depending on the zoom. How much looks like random. Sometimes it clips, sometimes it fits and sometimes there is a lot of spacing.
If you have more characters in one line to display the difference is more visible.
I also now checked that with a text block in a size box with overrriden width. If i decrease the font scale and again display a lot of text… the actual drawn text width again changes depending on the zoom.
I mean, that is not a problem since word wrapping still looks just fine but in a scale box, were the desired size then probably is just wrong, this is problem.
It might just how i in the end used it, but it looks to me like a bug in engine or something else.
To reproduce (UMG or Slate, same behaviour):
- Create a SizeBox, override the width with a given value.
- Insert a ScaleBox.
- Insert a TextBlock
- add one line with a lot of characters to the text of the textblock
- done (now zoom in editor or change the size of the size box to see the weird text width/scale changes)
Scale with unecessery space:
Scale with clipping (note the missing “block”, yes it is in the text field, and yes word wrapping is off):
I also noticed that this happens with, as far as I tested, every Text rendering widget.
I would very appretiate any information about possible fixes without engine changes, but they are also okay if there is realy no other way.