Packagefeathers.text
Classpublic class BitmapFontTextFormat
InheritanceBitmapFontTextFormat Inheritance Object

Product Version : Feathers 1.0.0

Customizes a bitmap font for use by a BitmapFontTextRenderer.

See also

feathers.controls.text.BitmapFontTextRenderer


Public Properties
 PropertyDefined By
  align : String = "left"
Determines the alignment of the text, either left, center, or right.
BitmapFontTextFormat
  color : uint
The color used to tint the bitmap font's texture when rendered.
BitmapFontTextFormat
  font : BitmapFont
The BitmapFont instance to use.
BitmapFontTextFormat
  fontName : String
[read-only] The name of the font.
BitmapFontTextFormat
  isKerningEnabled : Boolean = true
Determines if the kerning values defined in the BitmapFont instance will be used for layout.
BitmapFontTextFormat
  leading : Number
A number representing the amount of vertical space (called leading) between lines.
BitmapFontTextFormat
  letterSpacing : Number = 0
The number of extra pixels between characters.
BitmapFontTextFormat
  size : Number
The size at which to display the bitmap font.
BitmapFontTextFormat
Public Methods
 MethodDefined By
  
BitmapFontTextFormat(font:Object, size:Number, color:uint = 0xffffff, align:String, leading:Number = 0)
Constructor.
BitmapFontTextFormat
Property Detail
alignproperty
public var align:String = "left"

Determines the alignment of the text, either left, center, or right.

The default value is flash.text.TextFormatAlign.LEFT.

colorproperty 
public var color:uint

The color used to tint the bitmap font's texture when rendered. Tinting works like the "multiply" blend mode. In other words, the color property can only make the text render with a darker color. With that in mind, if the characters in the original texture are black, then you cannot change their color at all. To be able to render the text using any color, the characters in the original texture should be white.

The default value is 0xffffff.

See also

fontproperty 
public var font:BitmapFont

The BitmapFont instance to use.

fontNameproperty 
fontName:String  [read-only]

The name of the font.


Implementation
    public function get fontName():String
isKerningEnabledproperty 
public var isKerningEnabled:Boolean = true

Determines if the kerning values defined in the BitmapFont instance will be used for layout.

The default value is true.

leadingproperty 
public var leading:Number

A number representing the amount of vertical space (called leading) between lines. The total vertical distance between lines is this value added to the BitmapFont instance's lineHeight property.

The default value is 0.

letterSpacingproperty 
public var letterSpacing:Number = 0

The number of extra pixels between characters. May be positive or negative.

The default value is 0.

sizeproperty 
public var size:Number

The size at which to display the bitmap font. Set to NaN to use the default size in the BitmapFont instance.

The default value is NaN.

Constructor Detail
BitmapFontTextFormat()Constructor
public function BitmapFontTextFormat(font:Object, size:Number, color:uint = 0xffffff, align:String, leading:Number = 0)

Constructor.

Parameters
font:Object
 
size:Number (default = NaN)
 
color:uint (default = 0xffffff)
 
align:String (default = NaN)
 
leading:Number (default = 0)