Composite Fonts, How to use?
With ue4 release 4.6 there came in composite fonts. Within the game content there can be created font objects containing multiple fonts. I only have found a description how to use font picker in a blueprint.
But how to use composite fonts in C++ to draw text on the HUD canvas?
E.g. I have created a composite font containing 4 fonts:
Now using the font to draw a text on the screen.
The text "CompositeVerdana" appears on the screen with the first font, named "Normal". I assume that the first font will be used by default.
But how to address the the other fonts, named "Italic", "Bold", and "BoldItalic", and how to make use of them?
Is it intented to use composite font with C++, does it has any advantages for C++, or is it just for blueprint comfort, and better don't make use of composite fonts in C++.?
That's correct, Canvas will use the first font unless you specify otherwise.
Specifying which font to use for a HUD is a little cumbersome though, as
It's fine to use composite fonts in C++, however they are best supported by Slate/UMG, rather than Canvas/HUD, and we recommend that UMG or Slate be used for any non-debug UIs.
answered Jul 21 '15 at 11:09 AM
Jamie Dale STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here