If I have a UI
with a .atlas
and a BitmapFont with a .atlas
is there a simple way to combine these into one or do I have to merge them myself in a image file and manually offset all the elements in the combined .atlas
to the correct position? It is doable manually but kinda tedious, and if there is a slight calculation error one might have to redo every position and/or size.
Asked
Active
Viewed 739 times
1
Madmenyo
- 7,643
- 6
- 46
- 88
1 Answers
4
Yes you can! Just let TexturePacker
do the packing work for you:
- Put the BitmapFont's .png file in the same folder where TexturePacker reads your images to pack. The same folder where all the other images are
- Put the BitmapFont's .fnt file in the same folder where your skin's .atlas file is (usually in the assets folder inside android project)
- Refresh the assets folder in eclipse (just in case..)
Now you can use the Bitmap font in the styles.json, like for example:
com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: somefont.fnt } }
donfuxx
- 10,696
- 6
- 41
- 74