I use the left font in the application on AndEngine
.
I caught myself thinking that in every Activity
I was re-creating a TextureBitmap
for the font, and actually loading the font. Considering that the font size is from 100 to 200 for different Activity
, there is a suspicion that this memory is good enough, that it can be critical for non-top devices.
How to use fonts in AndEngine?
Font loading example:
ITexture fontTexture = new BitmapTextureAtlas( getTextureManager(), 1024, 1024, TextureOptions.BILINEAR ); Font font = FontFactory.createFromAsset( fontTexture, this, "Droid.ttf", FONT_SIZE, true, Color.BLACK ); font.load();