Packagecom.flextoolbox.utils
Classpublic class FlexFontUtil

Utility methods for use with fonts in Flex.

See also

flash.text.TextField


Public Methods
 MethodDefined by
  
applyTextStyles(target:TextField, source:UIComponent):void
[static] Returns the TextFormat object that represents character formatting information for the label.
FlexFontUtil
Public Constants
 ConstantDefined by
  SIZE_MODE_FIT_TO_BOUNDS : String = "fitToBounds"
[static] Mode setting for the autoAdjustFontSize() function to specify that the font size should be increased to fill the maximum amount of space in the TextField.
FlexFontUtil
  SIZE_MODE_FIT_TO_BOUNDS_WITHOUT_BREAKS : String = "fitToBoundsWithoutBreaks"
[static] Mode setting for the autoAdjustFontSize() function to specify that the font size should be increased to fill the maximum amount of space in the TextField.
FlexFontUtil
  SIZE_MODE_NO_CHANGE : String = "noChange"
[static] Mode setting for the autoAdjustFontSize() function to specify that the font size should not be changed.
FlexFontUtil
  TEXTFIELD_VERTICAL_MARGIN : Number = 4
[static] The extra vertical margin around text in a TextField (the difference between height and textHeight, if the TextField is set to auto size).
FlexFontUtil
Method detail
applyTextStyles()method
public static function applyTextStyles(target:TextField, source:UIComponent):void

Returns the TextFormat object that represents character formatting information for the label.

Parameters
target:TextField — The TextField to which we'll apply the text styles.
 
source:UIComponent — The source of the styles.

See also

Constant detail
SIZE_MODE_FIT_TO_BOUNDSconstant
public static const SIZE_MODE_FIT_TO_BOUNDS:String = "fitToBounds"

Mode setting for the autoAdjustFontSize() function to specify that the font size should be increased to fill the maximum amount of space in the TextField.

SIZE_MODE_FIT_TO_BOUNDS_WITHOUT_BREAKSconstant 
public static const SIZE_MODE_FIT_TO_BOUNDS_WITHOUT_BREAKS:String = "fitToBoundsWithoutBreaks"

Mode setting for the autoAdjustFontSize() function to specify that the font size should be increased to fill the maximum amount of space in the TextField. Additionally, if possible, words should not be broken apart onto multiple lines.

SIZE_MODE_NO_CHANGEconstant 
public static const SIZE_MODE_NO_CHANGE:String = "noChange"

Mode setting for the autoAdjustFontSize() function to specify that the font size should not be changed.

TEXTFIELD_VERTICAL_MARGINconstant 
public static const TEXTFIELD_VERTICAL_MARGIN:Number = 4

The extra vertical margin around text in a TextField (the difference between height and textHeight, if the TextField is set to auto size).