class org.aswing.ASFont
| Sub classes | ||||||
![]() | ASFontUIResource, EmptyFont |
| ||||
Font that specified the font name, size, style and whether or not embed.
Author paling, ngrebenshikov
Instance Fields
function new(?name:String = 'Tahoma', ?size:Float = 11, ?bold:Bool = false, ?italic:Bool = false, ?underline:Bool = false, ?embedFontsOrAdvancedPros:Dynamic = null): Void
Create a font.
@see ASFontAdvProperties
| embedFontsOrAdvancedPros | a boolean to indicate whether or not embedFonts or a |
function apply(textField:TextField, ?beginIndex:Int = -1, ?endIndex:Int = -1): Void
Applys the font to the specified text field.
| textField | the text filed to be applied font. |
| beginIndex | The zero-based index position specifying the first character of the desired range of text. |
| endIndex | The zero-based index position specifying the last character of the desired range of text. |
function computeTextSize(text:String, ?includeGutters:Bool = true): IntDimension
Computes text size with this font.
@see AsWingUtils.computeStringSizeWithFont
| text | the text to be compute |
| includeGutters | whether or not include the 2-pixels gutters in the result |
| returns | the computed size of the text |
function getTextFormat(): TextFormat
Creates a text format that contains the font properties.
| returns | a text format. |
