the definition of the char in BMFont file

279 Views Asked by At
`char id=52 x=180 y=5 width=50 height=50 xoffset=0 yoffset=0 xadvance=50 page=0 chnl=0`

The string above is the definition of char '1'.

I wonder what does the property 'page' and 'chnl' mean.

1

There are 1 best solutions below

0
On BEST ANSWER

The BMFont format can be found here

AngelCode bmfont file format

page The texture page where the character image is found. Blockquote

chnl The texture channel where the character image is found (1 = blue, 2 = green, 4 = red, 8 = alpha, 15 = all channels).

page is used when the glyphs are spread over multiple images (pages). In the common section in the header of the file you can see the number of pages

common pages The number of texture pages included in the font.

The channnels (red/green/blue/alpha) can store different information for the glyph.

common packed Set to 1 if the monochrome characters have been packed into each of the texture channels. In this case alphaChnl describes what is stored in each channel.

common alphaChnl Set to 0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.

common redChnl Set to 0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.

common greenChnl Set to 0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.

common blueChnl Set to 0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.