Hotline Miami 2: Wrong Number

Hotline Miami 2: Wrong Number

25 ratings
Creating Custom Fonts
By Maxim_S
This guide will teach you how to create your own fonts the same way as developers did!
   
Award
Favorite
Favorited
Unfavorite
Tools
Tools needed:
HLMWADExplorer[github.com] (Community patch[github.com] by muster128)
BMFont[www.angelcode.com]

HLMWADExplorer is required for replacing font files.

BMFont is the main tool for creating fonts, used by developers themselves.
Using BMFont
Export settings for creating HLM2 fonts
Firstly, you have to change default settings before exporting the font.

1. Go to Options > Export Options.

2. Set Font descriptor to XML.

3. Set Textures to PNG.


Depending on font size, you may wanna change Texture's Width and Height as well.
(HLM2 can handle different font sheet sizes, so ignore the warning when importing in HLMWADExplorer.)

4. Click OK.



Font settings

In order to create a font, go to Options > Font Settings, there you have to set desired font and size, and change other settings as you like.



I recommend checking "Match char height", "Do not include kerning pairs", and using Super Sampling at level 2.
You can play around the settings to get desired look.

You can view and select which characters are gonna be used in the font, and you can exclude them by clicking individual character. Available character sets may differ depending on font you're using.



This allows you to add characters that aren't unsupported by original font! Be aware though, if the game is using a character that isn't supported by the custom font, it's gonna crash.

You can see font sheet preview by going to Options > Visualize (or using V shortcut key).
Font example
In this example I will be creating custom level transition font.

I will be using Dust West font.
https://www.dafont.com/dust-west.font
Level transition font is named "font0" in game files.



Font size should match original font's size, which you can check by previewing font0.fnt in HLMWADExplorer, but you can set it to different size if you wish.



Your font may not fit on a single texture page, to fix this you have to set Texture's Width and Height to bigger values.
HLM2 cannot use multiple texture pages (as there is no way to add more files), so you wanna make sure all characters are placed on a single texture.





Here are my font settings.





Once you're satisfied with the font, go to Options > Save Bitmap Font As... to export your font.
You should see corresponding .FNT and .PNG files in the export folder.



Font is ready to be imported in the game!

Replace font0.fnt and font0_0.png in HLMWADExplorer and save a new patchwad.



Boot up the game and take a look at the new font!

Conclusion
BMFont allows you to easily create custom fonts, however if you wish to replace title screen logo you'd still need to do manual .FNT editing to replace a character with entire logo.
However I got you covered, as I've made Custom Menu Template Pack a while ago!
Read README.txt for how to use it.
https://www.dropbox.com/scl/fi/mcgu4dcj4k3ohqytljmqr/CustomMenuTemplatePack.zip?rlkey=ra4tt9icimbqflwaqhpufpn59&st=kghmhg04&dl=0

Few things to note while using BMFont:

Sometimes font X/Y offsets may look incorrect in-game, for example custom combo font (fntCombo) appears far above it's original position, and you'd need to manually edit .FNT file and change Y offset values for each character. I have not found solution to this so far.
If you have any questions let me know!

The tool has been used to create custom fonts for Redline campaign! Check them out! (And the campaign as well!)


Special thanks to Aura39 for discovering the tool!
3 Comments
Colind8 28 Jan @ 11:09am 
Epic
Maxim_S  [author] 3 Jan @ 10:33pm 
@bizzard, In that case you'd have to replace a character used in the title (for example, E) with a title, this can be done by putting title sprite on a font sheet, get it's X, Y, width and height using image editing program (such as Paint.NET) and putting these values in .FNT file via Notepad++. Pretty sure there are guides for .FNT editing.
bizzard 3 Jan @ 4:39pm 
what if i wanna create a original title without using the custom menu template?