This is a long story… but the steps outlined below work for me at any rate.
First of all, a font imported the ordinary way will in fact work fine, but not for a TextRenderActor specifically.
However, if you use it in a DrawText node in the HUD blueprint, it will perform as expected. Just wanted to point that out.
Anyway - to make a font for TextRenderActors, do this:
- Import your font as per usual, and rename it to something like “{your_font_name}DistanceField” to make it easier to tell it from an “ordinary” font later on.
- Open the newly imported font by double-clicking it in the Content Browser.
- In the Details panel of the Font Editor, search for “Distance” and you’ll find a checkbox labeled “Use Distance Field Alpha”. Check that box now.
- In the “Asset” menu of the Font Editor, click “Reimport {your_font_name}DistanceField”
- Wait for it to process. This can take quite a while. It seems like a good idea to make the initial import at a moderate point size, like 20 - 24 or something, to keep the number of font pages down. Otherwise the reimport turns into a good opportunity to take a lunchbreak. So, a simple font with a minimal glyph set is a good thing in this context.
- Save and close the Font Editor when the reimport is complete.
- Now place a standard TextRenderActor into your scene by dragging it from the Modes panel.
- In the Details panel, you’ll find that the TextRenderActor uses a material called DefaultTextMaterialOpaque. This is part of the Engine contents, not visible by default in the CB. Click the magnifying glass icon to browse to the asset in the content browser.
- The engine contents should automatically load in the CB, and the material in question is highlighted.
- Drag it into your Game folder and select the ‘Copy’ option when prompted.
- Rename your copy to ‘MyTextMaterial’ or something equally imaginative… Then open it in the Material Editor.
- In the Material Editor, select the Font (Font Param) node and change the name of the font in the Details panel to the name of your font.
- Apply, save and close the ME.
- Back in the level editor, select the TextRenderActor again and change its material in the Details panel to your new ‘MyTextMaterial’
- In the Text section (still details panel) set the correct font in the Font drop-down. This seems a bit reduntant, but it appears necessary from what I’ve seen here.
- Enter your text and marvel at: a) your new font in the scene, and b) the fact that you’ve just read and followed all these instructions (and that someone posted them).
It is quite possible that I’ve inadvertently left some step out, but this should probably get you going in the right direction.