# Can font faces in a ufont be accessed via C++?

**URL:** <https://forums.unrealengine.com/t/can-font-faces-in-a-ufont-be-accessed-via-c/432535>\
**Category:** Rendering\
**Tags:** hud, font, canvas, unreal-engine, CPP, question\
**Created:** [August 27, 2018, 6:17am UTC](https://forums.unrealengine.com/t/can-font-faces-in-a-ufont-be-accessed-via-c/432535 "2018-08-27T06:17:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScopeDogCustom](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ScopeDogCustom](https://forums.unrealengine.com/u/ScopeDogCustom)\
**Post date:** [August 27, 2018, 6:17am UTC](https://forums.unrealengine.com/t/can-font-faces-in-a-ufont-be-accessed-via-c/432535/1 "2018-08-27T06:17:51Z")

</div>

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.

 ![251681-unrealfontinterface.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/2/e/52eebbb74d0cf1a0b6d1ae98bc0cfc31a3409859.jpeg)

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.
