http://blog.csdn.net/u011373759/article/details/44308455
In the process of making games, we often use a variety of artistic fonts, which make our game look more beautiful and more cute (--!). )
But a lot of novices don't know how these fonts are made, this article is mainly about the cocos2dx of its companion UI making tools Cocostudio Art font use
The font maker uses the Bmfont
: Click to open link
First we make the art font we want (if you have an artist, this should not be your turn)
And then our goal is to make these images look like this:
The first step we open Bmfont:
The introductions are all in the picture.
In the second step, we are now going to associate a character with the corresponding image, and first select the 10 numbers we want to use to make them brighter.
Then open the edit above
Select Openimage Manager
It will pop up this one interface, we are selecting the image
Select Import Image
In file Here we select the picture of the character we want to make, here we have chosen
In the ID item, fill in its ASCII code, then click OK (You can now yy the author's name)
One of our characters has been made, and then you know ... What You don't understand! Put the remaining 9 numbers in! )
10 characters.
We choose the options option
First choose export options (Export Settings)
Under the texture option we select 32 bits, width and height according to their own
And then there's a textures under FileFormat, and we choose PNG.
Just like that, the others do not move. Click OK
Back in the options directory we chose Save bitmap font as this option, export
Ok
Next is the focus :
Here is a question, Cocostudio import this font will have errors, we change the name of the picture to the same name as FNT, is myfont.fnt and myfont.png, and then we open the Fnt file, you can use the system to bring the text open
Change the file= "Myfont_0.png" to the name of the picture, that is file= "Myfont.png", and then save it, OK.
Using Fonts in Cocostudio
Okay, class, homework: Learn how to use it in your code.
Art font making based on Cocostudio and Bmfont