fontmachine.bitmapchar

This module contains the BitMapChar class.
This class represent a character in a BitmapFont.

Table of contents:

Classes:
Class BitMapChar
Description:This class represents a font character.
Details: This class represents a font character and provides methods to load and unload the character images on dynamic fonts, and provide methods to get the location of the char in the packed texture on packed fonts.
Any character in any font, is an instance of this class.
Beaware that this font represent a character layer. That is, each character is a Face character, a Border character or a Shadow character.
Table of contents:Methods:
Fields:
  • drawingMetrics ( Field drawingMetrics:= new BitMapCharMetrics )
  • image ( Field image:Image )
  • packedFontIndex ( Field packedFontIndex:int )
  • packedPosition ( Field packedPosition:drawingpoint.DrawingPoint = new drawingpoint.DrawingPoint )
  • packedSize ( Field packedSize:drawingpoint.DrawingPoint = new drawingpoint.DrawingPoint )
Method CharImageLoaded:Bool()
Description:This method will return true or false if the character image has been loaded to VRam on dynamic fonts.
Returns:Bool
Details: Notice that this method will return always FALSE for packed fonts.
Method LoadCharImage()
Description:This method will force a dynamic font to load the character image to VRam.
Returns:Int
Method UnloadCharImage()
Description:This method will force a dynamic font to unload the character image from VRam.
Returns:Int
Field drawingMetrics:= new BitMapCharMetrics
Description:This field contains the drawing metrics information of the character. That is, width, height, space to next character, etc.
Field image:Image
Description:This field contains the character image on dynamic fonts.
Field packedFontIndex:int
Description:This field contains the texture index on packed fonts. (advanced use)
Field packedPosition:drawingpoint.DrawingPoint = new drawingpoint.DrawingPoint
Description:This field contains the X and Y offset of the character in the packed texture, on non dynamic fonts.
Field packedSize:drawingpoint.DrawingPoint = new drawingpoint.DrawingPoint
Description:This field contains the width and height offset of the character in the packed texture, on non dynamic fonts.


This FontMachine library is released under the MIT license:
Copyright (c) 2011 Manel Ibáñez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This document was generated using the Jungle IDE document generator version 12.02.13-A