Return to site

Bitmap font creator

broken image
broken image

A bitmap font is very similar to a texture atlas (see last article, only that it contains characters instead of images. However, there are times where this method is not perfect, e.g.: The bitmap is then used as a texture, just like any other image.Ĭreating this texture is relatively fast, and once it is created, the textfield will be rendered very quickly - it’s just an image, after all.

broken image

When you create a textfield in the way shown above, Sparrow asks Cocoa to render the text to a bitmap.

Click on the following image to get a bigger view of the fonts and their names. There are quite a number of different fonts already available on the iPhone. vAlign = SPVAlignCenter // vertical alignment

broken image

hAlign = SPHAlignCenter // horizontal alignment textField. Sparrow makes it easy to do so: SPTextField * textField = textField. Almost any game will have to display some text sooner or later.