Creating a new font mod

Updated 2 years ago
  1. Get Unity v2019.4.26f1
  2. Create a new project (or skip to Step 5 if you are reusing an already-made Font Replacer project)
  3. Go to Window > TextMeshPro > Import TMP Essential Resources, click Import in the new popup window
  4. Go to Window > Package Manager and install Asset Bundle Browser, then close the Package Manager
  5. Drag and drop your custom font file into the Unity window, in the Assets folder
  6. Go to Window > TextMeshPro > Font Asset Creator
  7. Set the Source Font File to the font that you just dragged in
  8. Set Padding to 8 and Packing Method to Optimum
  9. Click Generate Font Atlas, then click Save and give your font asset a name
  10. Close the Font Asset Creator
  11. 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
  12. 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
  13. Click on your Font Asset, then set its AssetBundle (in bottom-right) to <any_name_here>.fontreplacerbundle
  14. Go to Window > AssetBundle Browser > Build and click Build, then close the AssetBundle Browser
  15. Close Unity
  16. In File Explorer, open your project folder, go to AssetBundles/StandaloneWindows, and copy your .fontreplacerbundle file
  17. 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!