Fork me on GitHub

Documentation for the Maniaplanet game operating system

You can import fonts from ttf and otf files. Then you will be able to use the Font.Gbx files generated by the import process in your manialinks to display labels with custom fonts. Note that players will need the Font.Gbx file to display your manialink correctly, so it is recommended that you use custom fonts only inside a title pack (which includes those font files).

Importing a font is quite simple, just follow these steps

1. Place the font file in Work folder

The font file you want to import must have the extension .ttf, .otf or .ttc. Ttf and otf are the most commonly used font formats, you can find such files very easily on the web.

First you have to place this font file in a folder that we will call {FontFileFolder} and that must be {maniaplanet_user_dir}/Work/Media/Font or any subfolder you want.

For example, the path of your font file could be: C:/Users/Bob/Documents/ManiaPlanet/Work/Media/Font/times.ttf or C:/Users/Bob/Documents/ManiaPlanet/Work/Media/Font/FontPack1/times.ttf

2. Create the xml file

To import a font, you must create a .xml file describing how to import it. Create a new empty file and name it {FontName}.xml, where {FontName} is the name that will be used in manialinks. It is often a good idea to use the same name as the original font file but you don't need to.

Then place this file in {XmlFileFolder}, that must be {maniaplanet_user_dir}/Work/Media/Font or any subfolder you want. It is recommended to use the same folder as {FontFileFolder}, but you can use another if you want.

Finally, open the file and fill it with this single line: <Font File="{FontFilePathRelativeToXmlFolder}"/>, where {FontFilePathRelativeToXmlFolder} is the complete path (with filename and extension) of the font file relative to {FontFileFolder}. You can use "../" to go to parent folder.

For example:

3. Import

Now open a command line prompt in the {Maniaplanet_exe_dir} (the folder where you have unzipped the NadeoImporter) and then type the command :

NadeoImporter Font {XmlFileFolderPathRelativeToWorkFolder}/{FontName}.xml

where {XmlFileFolderPathRelativeToWorkFolder} is the path of the folder containing the xml file you have created in step 2, relative to {maniaplanet_user_dir}/Work folder.

This command will create several files:

For example, if the path of the xml file is: C:/Users/Bob/Documents/ManiaPlanet/Work/Media/Font/TimesNewRoman.xml then you will type NadeoImporter Font Media/Font/TimesNewRoman.xml which will create C:/Users/Bob/Documents/ManiaPlanet/Media/Font/TimesNewRoman.Font.Gbx, C:/Users/Bob/Documents/ManiaPlanet/TimesNewRoman_Textures/TimesNewRoman_00.dds and C:/Users/Bob/Documents/ManiaPlanet/Media/Font/TimesNewRoman_Textures/TimesNewRoman_01.dds

Note: If you want to put this font in one of your title packs, do not forget to include not only the Font.Fbx files but also all the textures in the related textures directory

4. Use the font in your manialinks

Labels have an attribute called "textfont" which enables you to use a custom font for the text to display.

For example,