TextRender doesn't load font correctly.

You need to make a font material. Here’s how:

  • Import your font. Double click it to go to its editor.
  • Change Font Cache Type to Offline.
  • Expand Import Options, and set Height to 20, or whatever makes this happen: In the image, you want the row with the letter Z to be at the bottom of the first image square. Usually you’ll have extra symbols spilling into a second image. If you need those symbols, make a another font file with only those symbols, import it, and follow these instructions.
  • Scroll down to check Use Distance Field Alpha
  • Save. Under Asset, click Reimport. Save.
  • Create a new material.
  • Right click and create a FontSampleParameter node. Click it to see its details. Chose your font for Font.
  • Create a LinearInterpolate node. Click to go to details. Set Const A to -90 and Const B to 90.
  • Plug the top pin from your Font node into the Alpha of the Lerp node.
  • Click the main node, the big guy with all the inputs, to go to its details. Set Blend Mode to Masked.
  • Plug the result of your Lerp into Opacity Mask of the main node.
  • Plug anything you want into Base Color of the main node. You can use a Constant3Vector for a simple color.

Now that you’ve done that, implementing it into a TextRender actor is easy.

  • Go the details of the TextRender actor.
  • Set Text Material to your new material.
  • Set Font to the same font you used for your material.

Keep in mind that the very first step I mentioned, changing Font Cache Type to Offline, will make it so your font cannot be selected in UMG. You can make a duplicate of your font and set the Font Cache Type to Runtime to use it in UMG.

For ease of organization, I like to name one Font_render and the other Font_UMG.

3 Likes