Moai SDK  2.0
MOAIBitmapFontReader Class Reference

Inherits MOAIFontReader.

Function List


Detailed Description

Legacy font reader for Moai's original bitmap font format. The original format is just a bitmap containing each glyph in the font divided by solid-color guide lines (see examples). This is an easy way for artists to create bitmap fonts. Kerning is not supported by this format.

Runtime use of MOAIBitmapFontReader is not recommended. Instead, use MOAIBitmapFontReader as part of your tool chain to initialize a glyph cache and image to be serialized in later.

Function Documentation


Rips a set of glyphs from a bitmap and associates them with a size.

function loadPage ( MOAIBitmapFontReader self, string filename, string charCodes, number points [, number dpi ] )

stringfilename Filename of the image containing the bitmap font.
stringcharCodes A string which defines the characters found in the bitmap
numberpoints The point size to be associated with the glyphs ripped from the bitmap.
numberdpi Optional. The device DPI (dots per inch of device screen). Default value is 72 (points same as pixels).