Packageorg.flixel
Classpublic class FlxBitmapFont
InheritanceFlxBitmapFont Inheritance Object

This is a text display class which uses bitmap fonts.



Public Properties
 PropertyDefined By
  height : uint
The height of the font in pixels
FlxBitmapFont
  horizontalPadding : uint
The amount of space between characters in pixels
FlxBitmapFont
  imgDefaultFont : Class
[static]
FlxBitmapFont
  pixels : BitmapData
The bitmap onto which the font is loaded
FlxBitmapFont
  rects : Array
The bounding boxes of each character
FlxBitmapFont
  verticalPadding : uint
The amount of space between lines in pixels
FlxBitmapFont
Public Methods
 MethodDefined By
  
FlxBitmapFont(Image:* = null, Height:uint = 5, HorizontalPadding:uint = 1, VerticalPadding:uint = 5, Alphabet:String = !"#$%&'()*+,-./0123456789:, offsets:Array = <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)
Sets the font face to use.
FlxBitmapFont
  
getTextWidth(s:String):uint
FlxBitmapFont
  
getWidthForChar(currentChar:int):uint
FlxBitmapFont
Property Detail
heightproperty
public var height:uint

The height of the font in pixels

horizontalPaddingproperty 
public var horizontalPadding:uint

The amount of space between characters in pixels

imgDefaultFontproperty 
public static var imgDefaultFont:Class

pixelsproperty 
public var pixels:BitmapData

The bitmap onto which the font is loaded

rectsproperty 
public var rects:Array

The bounding boxes of each character

verticalPaddingproperty 
public var verticalPadding:uint

The amount of space between lines in pixels

Constructor Detail
FlxBitmapFont()Constructor
public function FlxBitmapFont(Image:* = null, Height:uint = 5, HorizontalPadding:uint = 1, VerticalPadding:uint = 5, Alphabet:String = !"#$%&'()*+,-./0123456789:, offsets:Array = <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)

Sets the font face to use.

Parameters
Image:* (default = null) — The font image to use
 
Height:uint (default = 5) — The height of the font in pixels
 
HorizontalPadding:uint (default = 1) — Padding between characters in pixels
 
VerticalPadding:uint (default = 5) — Padding between lines in pixels
 
Alphabet:String (default = !"#$%&'()*+,-./0123456789:) — The alphabet represented by this font
 
offsets:Array (default = <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~)
Method Detail
getTextWidth()method
public function getTextWidth(s:String):uint

Parameters

s:String

Returns
uint
getWidthForChar()method 
public function getWidthForChar(currentChar:int):uint

Parameters

currentChar:int

Returns
uint