(This is a translation of a [Japanese [Content removed] by Kitamura Toshihide.)
Thank you for your continued support.
I would like to know how to fix the letter width when displaying text in message windows etc. using UMG.
In the following thread, there is a similar issue reported:
BUG: Letter spacing depends on zoom / screen size
[Content removed]
The answer there, however, contains the following:
A limitation of this however is that we have to respect kerning rules when rending vector text at different scales (Which introduces integer rounding). In fact this issue occurs even with zero letter spacing.
So I guess that is still the expected behavior of the current font rendering. However, I would like to ask if there is any way to fix the width currently.
If the width is not fixed, line breaks can occur at unintended positions. This may cause overlapping with the next line. Also, the text may extend beyond the window width. This is quite difficult to handle.
One possible workaround is to arrange letters/characters one by one, but this method can’t use kerning. Also, this method is not ideal in terms of localization.
When this issue occurred in the past, we addressed it by converting all font glyph widths that were calculated as integers into floats (not kerning widths, but XAdvance, BaseLine, MaxHeight, and related parts). However, this approach was costly because there were too many places to convert. So I’d appreciate it if you could provide any official solution or workaround. Is there any plan to update for this issue?
Also, when I practiced the float conversion of XAdvance, I did not find any issues with font rendering, but even so, in order to display letters/characters neatly, is it necessary to render each letter/character using the integer width?
I have attached the reproduction file, MsgTest.zip. In the project, I changed the DPI scale to be linear up to 4K.
900x540
[Image Removed]
1120x630
[Image Removed]