Create a new instance of the FontTexture class
|name||string||the name of the texture the name of the texture|
|font||string||the font to use, use the W3C CSS notation the font to use, use the W3C CSS notation|
|scene||Scene||the scene that owns the texture|
|optional||maxCharCount||number||the approximative maximum count of characters that could fit in the texture. This is an approximation because most of the fonts are proportional (each char has its own Width). The 'W' character's width is used to compute the size of the texture based on the given maxCharCount the approximative maximum count of characters that could fit in the texture. This is an approximation because most of the fonts are proportional (each char has its own Width). The 'W' character's width is used to compute the size of the texture based on the given maxCharCount|
|optional||samplingMode||number||the texture sampling mode|
|optional||superSample||boolean||if true the FontTexture will be created with a font of a size twice bigger than the given one but all properties (lineHeight, charWidth, etc.) will be according to the original size. This is made to improve the text quality.|
Make sure the given char is present in the font map.
@return the CharInfo instance corresponding to the given character
|char||string||the character to get or add the character to get or add|
Call this method when you've call getChar() at least one time, this will update the texture if needed.
Don't be afraid to call it, if no new character was added, this method simply does nothing.
For FontTexture retrieved using GetCachedFontTexture, use this method when you transfer this object's lifetime to another party in order to share this resource.
When the other party is done with this object, decCachedFontTextureCounter must be called.
Use this method only in conjunction with incCachedFontTextureCounter, call it when you no longer need to use this shared resource.