S2ENGINE HD  1.4.6
Official manual about S2Engine HD editor and programming
Fonts

Creating Fonts

To create fonts in a format compatible with S2engine HD import font module you can use BMFont application.
You can download it from: http://www.angelcode.com/products/bmfont/

With this application you will produce a Font Texture and an XML font configuration file with extension .fnt.
After downloaded and installed BMFont open it.

fontimport03.jpg

You can choose the set of characters to include into the font texture, checking them on the right side.
Now you must configure font creation in order to produce a file compatible with S2Engine importer.

  • Select Options->Font Settings. Font Settings dialog will appear.
  • Choose the Font type using the top combobox
  • Choose Font size and height as you want
  • Check Match char height has showed into the following image
  • Click OK
    fontimport02.jpg

Now you must configure export settings

  • Select Options->Export Options. Export Options dialog will appear
  • Check Equalize the cell heights
  • Choose Font texture size.
    Warning
    BMFont support font texture paging (i.e. more than one texture in order to contain all font characters) S2Engine HD NO for now. So make sure to choose a size for the texture that is able to include all your font characters.
  • Check 32 as Bit depth
  • Check XML as export file format
  • Choose PNG as font texture file format as showed into the following image
    fontimport01.jpg

You can preview the font texture that will be exported by clicking on Options->Visualize so you can check if a single texture containing all font characters is created.
Once your font is ready you can export it by clicking on Options->Save bitmap font as...

Importing Fonts

To import font:

  • Open the font browser (see Browsers)
  • Choose a folder in which to put the font (in the example below we choose Font named folder, you can choose the one you want).
    fontimport04.jpg

  • Select File->Import... from the main menu as showed into the following image
    fontimport05.jpg

    The ImportDialog appear:
  • Choose the font file previously exported from BMFont you want to import.
  • Click on Open
    Note
    Remember the fonts to import have extension .fnt
    fontimport06.jpg

    The Font Import Settings dialog appear:
  • The only existing parameter is the DestinationFolder. The starting value is the name of the folder you have previously chosen, if it doesn't exist the importer will create it.
    Note
    If you want to add subfolder add "\" simbol followed by subfolder name. You can also completely change the folder name with another you want, also if it doesn't exist, AND PRESS ENTER
    fontimport07.jpg