How to create a Font Mod

The fonts in Ancient Cities are Truetype fonts converted to bitmaps with the help of a free program called Bitmap Font Generator.

You can find the latest version here: BMFont - AngelCode.com

We attach here bmfont.zip (851 Bytes) the default configuration we use for the BMFont program, you need to put in the same directory as the executable.

Open the program using this default configuration and in the ‘Options/Font Settings’ menu option, select your desired font from all the fonts available in your system. Validate with an ‘Ok’.

After that you need to check all the ‘Unicode’ sections in the right column that your language will need.
It’s recommended to select also the codes 000000 to 000250 for Ancient Cities base languages compatibility.

Now you can export your font using the ‘Options/Save bitmap font as…’ menu option.
This creates two files, the fontname.fnt and the fontname_0.tga file.

To increase readability we process the tga file using Adobe Fotoshop, or if you don’t have access to a Photoshop program, you can try to use this tool: Distance Field

Apply Distance Effect with Photoshop

1.- Separate the text in a new layer leaving the background in black.

2.- In the text layer add a stroke effect.

01

3.- Configure with the following parameters:

Position: Center
Blending mode: Normal
Fill type: Gradient
Style: Shape Burst

Increase effect size. The amount depends on the size of the generated texture and the size of the text glyphs.
The effect should be similar to this image

With all this work you are capable to replace the actual base font of Ancient Cities for wherever you want !

Inside the Ancient\Font base directory of your mod create a Font.art file using your new font.

Reference:
{
	Name:"H1"
	ReferenceNode:"../List/FontName/H1"
}

Reference:
{
	Name:"H2"
	ReferenceNode:"../List/FontName/H2"
}

Reference:
{
	Name:"H5"
	ReferenceNode:"../List/FontName/H5"
}

Group/Loader:
{
	Name:"List"
	State:"Enabled"
}

Reference:
{
	Name:"P"
	ReferenceNode:"../List/FontName/P"
}

Make a directory with your fontname and copy and rename the *.fnt file to Font.fnt and the *.tga to Texture.tga

Create a Index.art file with this content

Group:
{
	Name:"H1"

	Font2/File:
	{
		Name:"Font"
		File:"Font.fnt"
		Size:"0.15"
		LetterSpacing:"0"
		TokenSpacing:"25"
		Skew:"0"
		KerningChar:"'f','y','g'"
		KerningValue:"-15,-15,-10"
	}

	Reference:
	{
		Name:"Render"
		ReferenceNode:"../../Render"
	}
}

Group:
{
	Name:"H2"

	Font2/File:
	{
		Name:"Font"
		File:"Font.fnt"
		Size:"0.17"
		LetterSpacing:"-2"
		TokenSpacing:"12"
		KerningChar:"'f','y','g'"
		KerningValue:"-15,-15,-10"
	}

	Reference:
	{
		Name:"Render"
		ReferenceNode:"../../Render"
	}
}

Group:
{
	Name:"H5"

	Font2/File:
	{
		Name:"Font"
		File:"Font.fnt"
		Size:"0.26"
		TokenSpacing:"12"
		KerningChar:"'f','y','g'"
		KerningValue:"-20,-15,-10"
	}

	Reference:
	{
		Name:"Render"
		ReferenceNode:"../../Render"
	}
}

Group:
{
	Name:"P"

	Font2/File:
	{
		Name:"Font"
		File:"Font.fnt"
		Size:"0.12"
		LineHeight:"1"
		LetterSpacing:"0"
		TokenSpacing:"25"
		Skew:"0"
		KerningChar:"'f','y','g'"
		KerningValue:"-15,-15,-10"
	}

	Render/Flat:
	{
		Name:"Render"
		Blend:"Alpha"
		MaskFactor:"1"
		MaskLimit:"0.5,0.25"
		Dither:"0"
		Color:"1,1,1"
		ColorBalance:"0,1,1"
		ColorHSV:"0,0,1"
		Emission:"1,0"
		MaskTexture:"../../Texture"
		UvMask:"0"
		MaskDistanceField:"0"
		Uv:"0"
	}
}

Render/Flat:
{
	Name:"Render"
	Blend:"Alpha"
	MaskFactor:"1"
	MaskLimit:"0.5,0.2"
	Dither:"0"
	Color:"1,1,1"
	ColorBalance:"0,1,1"
	ColorHSV:"0,0,1"
	Emission:"1,0"
	MaskTexture:"../Texture"
	UvMask:"0"
	MaskDistanceField:"0"
	Uv:"0"
}

Texture2/File:
{
	Name:"Texture"
	PixelFormat:"R8"
	BakeToksvigSigma:"0"
	File:"Texture.tga"
}

Pay attention to create all text files with Notepad++ in ‘UCS-2 LE BOM’ format

You have a new Font Mod for Ancient Cities !!!