1. download and install the free Bitmap Font creation tool Bitmap Font Generator in windows
Tools:Http://www.angelcode.com/products/bmfont/install_bmfont_1.13.exe
2. Open the software and select Opotion> FontSetting to set the font to be exported.
I will use here. Size can set the font Size, it is best to set the Size of the Size, here is 32 Height can set the font stretch Height, keep the default 100% can be
3. select Edit-> Clear all chars in font to Clear the following characters.
4. Select the menu Edit-> Selecting text from file... select a file that contains the text you want to generate.
Generate a *. Txt file containing the file you want to generate the font, as shown in figure
Select the created txt file. If any error occurs, check whether the txt file is unicode or UTF-8 encoded and whether the font contains the font in the text.
5. Option-> ExportOptions to set the exported style.
Here are some important points.
This attribute is very important when Padding is used to specify the size of the text surrounding the text and make the style later, we need to reserve space for special effects such as stroke and glow. For example, I expect to add a 2px border for my style and then add a 2px projection effect in the lower right corner, so I set the padding: 2px 4px 4px 2px
BitDepth, which must be 32 bits; otherwise there is no transparent layer
Presets: Specifies the preset color channel settings for font initialization, that is, the initial color settings of the font. We recommend that you use White text to set it to White text with alpha, that is, the transparent background of the White text.
Font descript: Specifies the Font description file. It can be in text or xml format, that is, fnt.
Textures, texture image format, decisive png.
6. option-> Save bitmap font...
Export it into a text file and a description file. If you follow the above configuration, there will be a *. png and a *. fnt
This is the exported png image. To make it clear, I chose black and transparent. The specific color depends on your application.