How are you scaling your widget? Text in Slate will be scaled based on the widget scale when drawing, however if you’re just constricting the widget size, the text will start to clip (like what you’re seeing there).
With regards to Canvas - the Canvas scaling issue is fixed in 4.7 (scaling for runtime fonts just wasn’t implemented for 4.6), however Canvas just scales the rendered glyph texture rather than re-drawing the glyph at the newly scaled size (which is what Slate does). We did this as it matched the older offline (bitmap) font way of scaling fonts in Canvas, and avoids potentially spamming the font cache when drawing animating text (for which texture scaling is acceptable).
Wow Jamie, thanks for the hyper quick answer.
Glad to read that 4.7 fixes the Canvas DrawText scale issue.
About my UMG issue, I relied on the anchor to scale the widget, hoping that the content of the box would scale accordingly, which seems to be a very dumb thing to do.
I just figured out that the problem came from the project’s DPI scale curve.
I set it to “Horizontal” and made it linear. Now, it natively achieves the rescaling effect I expected without any additional awkward anchor tweaking.
Sorry for the noob question and thanks again for the answer.
Hey Jamie,
I just stepped to 4.7 today. I checked the FCanvasTextItem::DrawStringInternal_RuntimeCache() but I can’t see any code for scaling displayed text (Scale does about nothing in that function).
It is well implemented in FCanvasTextItem::DrawStringInternal_OfflineCache() though, for instance, you have :
Ok, I see it when I get the 4.7 code from GitHub but it’s not in the release branch.
Also, when you simply install the 4.7 version from the launcher, you don’t see it.
Is that normal ?
I’ve tried it and it works fine, except that the mesh generated in the BatchElements are not displayed with linear smoothing. Those with offline fonts are.
So the display gets jaggy
as you scale down the text.
I posted a question on that matter : link here
Thanks already.