SetTextFontImage

Description

Sets the font to use for this text object. AGK has a built in font that it uses for text objects, this allows you to override it. If you are setting all your text objects to the same font you should use SetTextDefaultFontImage instead as this will save some processing time.

The image should contain all white characters surrounded by a transparent alpha channel. Fully transparent pixels should also contain white in their RGB components.

The font image may either be fixed width or variable width. For fixed width the font image must be laid out in a grid of 16 characters across and 6 characters down, starting with the ascii character 32 (space) in the top left and proceeding left to right, top to bottom, ending with ascii character 127 (DEL) in the bottom right. The image width must be divisible by 16 and the image height must be divisible by 6. For variable width the image must be an atlas texture accompanied by a subimages.txt file that states the location of each character on the image. The AGK will look for images "32" up to and including "127" in the subimages file and any not found will default to the space character (32). Variable height characters are not supported and all characters must be the same height with any necessary padding included in the font image.

As of version 2.0.20 you can use SetTextFont to use TrueType fonts instead of bitmap fonts. You must choose one or the other, setting a bitmap font will remove the Truetype font, and setting a TrueType font will remove the bitmap font.

Definition

SetTextFontImage( iTextIndex, iImageID )

Parameters