> For the complete documentation index, see [llms.txt](https://ferdowsur.gitbook.io/modular-3d-text/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ferdowsur.gitbook.io/modular-3d-text/text/fonts/creating-fonts.md).

# Creating fonts

*Supports only TTF file formats. If you are unable to find the TTF format of your font,* [*click here*](#convert-to-ttf-file) *for the steps to convert it.*

### *<mark style="color:yellow;">How to Create Fonts</mark>*

### *<mark style="color:yellow;">Video Tutorial</mark>*

{% embed url="<https://youtu.be/ZYpFn4k2sSk?si=n1-sMkzaKatwYWkt>" %}
Video tutorial of how to create fonts in modular 3d text
{% endembed %}

### *<mark style="color:yellow;">Written Tutorial</mark>*

1. *Go to **Tools > Tiny Giant Studios > Modular 3D Text*** ![](/files/gazJ8Qci2FW1Z42Xn7nc)
2. *Select the **Font Creation Tab*** <img src="/files/x3VaIsvVDa6Ciie7U7hl" alt="" data-size="line">
3. *Click **Create Font** button* <img src="/files/4FPLhWZ7b0Rvvr6udKqU" alt="" data-size="line">
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.‌*

### *<mark style="color:yellow;">About the Font Creation Settings</mark>*

![](/files/Cn4BTr0OPZ9bJrtzuk4U)

#### *<mark style="color:yellow;">Character input</mark>*

*Fonts can be generated with prebuilt characters. This provides better performance and finer controls.* [*Dynamic character generation*](https://ferdowsur.gitbook.io/modular-3d-text/text/fonts#dynamic-character-generation) *exists for characters that you might miss.*

*There are four different ways to input characters.*

1. *<mark style="color:green;">**Character Range**</mark>:* \
   *Includes all the characters between the first and last character.* [*Click here*](https://unicode-table.com/en/) *to get the range.*
2. *<mark style="color:green;">**Unicode Range**</mark>:* \
   *Includes all the characters between the first and last Unicode.*
3. *<mark style="color:green;">**Custom Characters**</mark><mark style="color:green;">:</mark>* \
   *Just type the characters you want in the font.*
4. *<mark style="color:green;">**Unicode Sequence**</mark>:* \
   *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.*

## *<mark style="color:yellow;">Convert to TTF file</mark>*

1. *Download* [*FontForge*](https://fontforge.org/en-US/downloads/)*. It's a tiny open-source application.*
2. *Open the application & select your font.*
3. *File > Generate Fonts...: To create your new font file*\
   ![](/files/85QeAoBNp1IGNINCsoim)
4. *If you want to make sure that kerning information is included, click options*![](/files/ZmYXzNc3f9QzfK2V0qYC)
5. Click and enable 'kern' table.\
   ![](/files/TAXPUA4DvEus2H5dcHYk)
6. ***Save your TTF file.***\
   *<mark style="color:green;">**Done!**</mark>*

## *<mark style="color:yellow;">Runtime font creation</mark>*

*<mark style="color:orange;">(RuntimeFontImporter.cs)</mark>* *<mark style="color:orange;">Requires</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**minimum version 3.2.0**</mark>*&#x20;

*Call **CreateFontFromTTFFile(byte\[] rfontBytes)**, pass the TTF file as a **byte array** and it will return a new **Font**.*&#x20;

*<mark style="color:red;">**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.**</mark>*

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

{% content-ref url="/pages/xiY2rtwb4AIjDGwWGARk" %}
[Troubleshoot](/modular-3d-text/text/fonts/creating-fonts/troubleshoot.md)
{% endcontent-ref %}
