I have a custom HUD that uses the DrawText() function to display text on screen. In the editor, I have a font set up with multiple font faces.
The UFont reference from the editor gets loaded in the HUD constructor.
ConstructorHelpers::FObjectFinder<UFont> FontObject(TEXT("Font'/Game/Fonts/RobotoMono.RobotoMono'"));
Font = (FontObject.Object) ? FontObject.Object : GEngine->GetSmallFont();
Later, during the overridden DrawHUD() function, each line of text is drawn.
DrawText(Text, TextColor, ScreenLocation.X, ScreenLocation.Y, Font, FontScale);
Is there a way to access the different font versions (bold, italic, etc) without relying on slate/UMG? Making a separate UFont reference for each font style doesn’t seem like the intended solution.