Creating fonts

A walkthrough of the workflow of creating fonts.

Supports only TTF file formats. If you are unable to find the TTF format of your font, click here for the steps to convert it.

How to Create Fonts

Video Tutorial

Video tutorial of how to create fonts in modular 3d text

Written Tutorial

  1. Go to Tools > Tiny Giant Studios > Modular 3D Text

  2. Select the Font Creation Tab

  3. Click Create Font button

  4. Select your TTF font file and wait a few seconds to process and then select the location inside your project where your mesh/font will be saved.‌

About the Font Creation Settings

Character input

Fonts can be generated with prebuilt characters. This provides better performance and finer controls. Dynamic character generation exists for characters that you might miss.

There are four different ways to input characters.

  1. Character Range: Includes all the characters between the first and last character. Click here to get the range.

  2. Unicode Range: Includes all the characters between the first and last Unicode.

  3. Custom Characters: Just type the characters you want in the font.

  4. Unicode Sequence: A sequence of Unicode for the characters. Separate codes with ',' and create ranges with '&'.

You can click the Debug.Log all characters button to check if the chracters are correct.

Convert to TTF file

  1. Download FontForge. It's a tiny open-source application.

  2. Open the application & select your font.

  3. File > Generate Fonts...: To create your new font file

  4. If you want to make sure that kerning information is included, click options

  5. Click and enable 'kern' table.

  6. Save your TTF file. Done!

Runtime font creation

(RuntimeFontImporter.cs) Requires minimum version 3.2.0

Call CreateFontFromTTFFile(byte[] rfontBytes), pass the TTF file as a byte array and it will return a new Font.

How to open a TTF file and convert it to a byte array depends on your use case and platform. The asset doesn't provide a way to open them.

Something to get started: https://docs.unity3d.com/ScriptReference/Windows.File.ReadAllBytes.html

Troubleshoot

Last updated