How can we make all STextBlock widgets use a default Font Asset (not Roboto)? We want to use built-in Slate editor widget classes like SHeaderRow, but many do not accept font or style attributes that can be passed down to the STextBlocks inside.
(This is inside SHeaderRow.cpp, showing that there is no font given to the STextBlock label.)
Further, it would be impractical to add a “.Font(fontInfo)” every place we create STextBlocks. As far as I can trace it, the default font is stored in this write-protected engine file:
The default style is used when there is no valid widget provided to.
You can create your own SHeaderRow instance with your own style and set it as a header in another widget, such as STableView or STreeView,
It is true that SHeaderRow does take a style argument, but it never passes a font to the underlying STextBlock, as shown in my first screenshot. This is why I believe it is impossible to pass a font to SHeaderRow or any class deriving from SHeaderRow.
To clarify, my question is not about SHeaderRow specifically, but about STextBlock. I’m looking for a universal way to change the default font of all STextBlocks everywhere, regardless of the widgets that contain or construct them.
This “NormalText” style is initialized in FCoreStyle::Create(...). It appears impossible to change this “NormalText” style by any means, since the getter returns a const reference and the setter is private:
I believe that changing the slate font universally in 4.26 is impossible without explicitly passing the style in every place where STextBlock is constructed or making a custom TextBlock widget. I would love to be shown otherwise, though.