|
NAMEal_grab_font_from_bitmap - Allegro 5 APISYNOPSIS
DESCRIPTIONCreates a new font from an Allegro bitmap. You can delete the bitmap after the function returns as the font will contain a copy for itself.Parameters:
The bitmap format is as in the following example, which contains three glyphs for 1, 2 and 3.
In the above illustration, the dot is for pixels having the background color. It is determined by the color of the top left pixel in the bitmap. There should be a border of at least 1 pixel with this color to the bitmap edge and between all glyphs. Each glyph is inside a rectangle of pixels not containing the background color. The height of all glyph rectangles should be the same, but the width can vary. The placement of the rectangles does not matter, except that glyphs are scanned from left to right and top to bottom to match them to the specified unicode codepoints. The glyphs will simply be drawn using al_draw_bitmap(3), so usually you will want the rectangles filled with full transparency and the glyphs drawn in opaque white. Examples:
The first example will grab glyphs for the 95 standard printable ASCII characters, beginning with the space character (32) and ending with the tilde character (126). The second example will map the first 96 glyphs found in the bitmap to ASCII range, the next 95 glyphs to Latin 1, the next 128 glyphs to Extended-A, and the last glyph to the Euro character. (This is just the characters found in the Allegro 4 font.) SEE ALSOal_load_bitmap(3), al_grab_font_from_bitmap(3)
Visit the GSP FreeBSD Man Page Interface. |