Creating a new font mod
Updated 2 years ago- Get Unity v2019.4.26f1
- Create a new project (or skip to Step 5 if you are reusing an already-made Font Replacer project)
- Go to Window > TextMeshPro > Import TMP Essential Resources, click Import in the new popup window
- Go to Window > Package Manager and install Asset Bundle Browser, then close the Package Manager
- Drag and drop your custom font file into the Unity window, in the Assets folder
- Go to Window > TextMeshPro > Font Asset Creator
- Set the Source Font File to the font that you just dragged in
- Set Padding to 8 and Packing Method to Optimum
- Click Generate Font Atlas, then click Save and give your font asset a name
- Close the Font Asset Creator
- Click on the arrow near the newly created Font Asset (blue F icon). It should reveal 2 new assets in it: the Material, and the Atlas
- Click the Material and change its properties:
- Set Face > Dilate to -0.07
- Enable Underlay
- Set Underlay colour to black with 95 opacity
- Set Offset X to 1, Offset Y to -1, Dilate to 1 and Softness to 0
- In Debug Settings, set Gradient Scale to 9 and Sharpness to 1
- Click on your Font Asset, then set its AssetBundle (in bottom-right) to
<any_name_here>.fontreplacerbundle
- Go to Window > AssetBundle Browser > Build and click Build, then close the AssetBundle Browser
- Close Unity
- In File Explorer, open your project folder, go to AssetBundles/StandaloneWindows, and copy your
.fontreplacerbundle
file - Go to your BepInEx/plugins folder and paste the
.fontreplacerbundle
file
That's it! Now you can launch your game and change the game font to your new font in Mod Options!
To share the font with others on Thunderstore, just include your .fontreplacerbundle
file.
Make sure that you are complying with the font licensing terms before uploading!