How to change Slate default font

cpage_opex
Fri, 06 Oct 2023 20:24:43 +0000
UI

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:

We are using Unreal Engine 4.26.2, so we can’t use the Common UI plugin as suggested here: https://forums.unrealengine.com/t/how-do-i-change-the-default-roboto-font-across-all-text-in-user-widget/1221172

How can we hook up a Font Asset to these text blocks by default?

5 posts - 2 participants