Text Widget with Outline draws on incorrect LayerId

Hi,

Text widget with Outline will use 2 LayerId levels to draw the outline and the text glyphs (see `FSlateElementBatcher::AddShapedTextElement`), but `FSlateTextRun::OnPaint` only increments LayerId once.

[Image Removed] [Image Removed]Regards, Igor

Steps to Reproduce
1. Create new Widget Blueprint.

2. Create a Canvas Panel.

3. Add Text to Canvas Panel.

4. Set Text Outline Size to any number greater then 0.

5. Set Text Color and Opacity to non-white.

6. Add Image to Canvas Panel.

7. See Text drawing on top of the Image.

Hi Igor.

Sorry about the delay. I am looking into this now and should get back to you soon.

Best regards,

Vitor

Hi Igor,

Thank you for the report. I have successfully reproduced the issue here with the steps you provided. I was also able to determine that this is a regression (it worked in UE 5.2 but not in 5.3) and that it still persists in the engine’s latest version.

I have just filed an internal bug report, here’s the bug tracker link: UE-290372. You should be able to access it once the engine devs mark it as public.

By the way, it seems that the issue can be fixed by editing the source code for function FSlateTextRun::OnPaint() and adding the following to the very end before the return statement:

if (Style.Font.OutlineSettings.OutlineSize > 0) ++LayerId;I hope this is helpful. Please let me know if you need anything further.

Best regards,

Vitor