If you’re looking to import a OFL (Open Font License) font from Google Fonts, check out how to easily do it using our Google Fonts importer.
Importing fonts is an important feature on Unreal Engine, since it means accurately styling the text and respecting the glyph/alphabet systems of multiple languages.
(it allows fonts that match the vibe of the project, but also support text for different language systems that might not be available on most fonts)
A comprehensive guide on how to import fonts to the engine is available on Unreal Engine’s documentation.
To get started, you need to create a Font Asset file and then assign a Font Face asset or an imported font file. There are different methods to create it, so just pick the one suitable for your needs:
- Drag your custom font file to the Content Browser (or use the Import button). You will get a prompt message to create a new UAsset file. (you should click yes once)
- Click the Add New button on the Content Browser and select the Font option found under User Interface.
Then open the Font Asset and click the folder icon to assign a custom font file.
(everything above this point) missing how to set-up each typeface → probably just point to unreal’s guide and just talk about the wrapper
Imported fonts need to have an ExpressiveTextFont wrapper asset so the plugin can automatically gather and interpret it. This also provides better control on these assets, more specifically how they should get loaded and cooked.
To create it, right-click on Content Browser and select Expressive Text Font under Expressive Text category. Open the file and assign your imported font.
The name on the ExpressiveTextFont asset should match the common name of the font since tags will use this name to reference it!
A variable font allows you to add different typefaces under the same font family, for example Italic or Bold. To know more about typefaces and how to use them, check out Parameters.
For this example, we’ll use the OFL Gluten font in its Regular and Bold typefaces.
After downloading your .TTF or .OTF files, start by dragging the regular typeface of your custom font to the content browser (or use method B, as shown above).
You’ll get a prompt asking to create a new Font asset using the imported Font Face as the default font, click Yes. It’s important to use the regular typeface of your variable font as this will be the default presentation.
After the files are generated, you should have something like this:
Rename the Font Asset to the font name (or other nomenclature you’re comfortable with), this will be the name found in the Style Editor and how to reference it by tags. In this case, we’ll simply rename it to “Gluten”.
Now to add the Bold typeface, open the Font asset and add a new font slot.
Rename it to Bold (or whichever typeface you’re adding) and import the custom font Bold file. It will prompt you to create and save a font face file. After that, you should have both font files allocated to their respective typefaces. Here’s how it looks:
Don’t forget to wrap your imported fonts on a ExpressiveTextFont asset!
Using tags to reference the font in its Regular typeface and Bold typeface — simply adding the tag &Gluten to determine the font and adding *bold to change its typeface.
That’s it! You can now add all your custom fonts and apply animations/effects to your liking.