Packageorg.purepdf
Classpublic class Font
InheritanceFont Inheritance Object
Implements IComparable, IClonable



Public Properties
 PropertyDefined By
  baseFont : BaseFont
Font
  color : RGBColor
Font
  family : int
Font
  familyname : String
[read-only]
Font
  familyName : String
[write-only]
Font
  isBold : Boolean
[read-only]
Font
  isItalic : Boolean
[read-only]
Font
  isStandardFont : Boolean
[read-only]
Font
  isStrikethru : Boolean
[read-only]
Font
  isUnderline : Boolean
[read-only]
Font
  size : Number
Font
  style : int
Font
Public Methods
 MethodDefined By
  
Font(family:int, size:Number, style:int, color:RGBColor = null, baseFont:BaseFont = null)
Font
  
clone():Object
Font
  
compareTo(o:Object):int
Font
  
Replaces the attributes that are equal to null with the attributes of a given font.
Font
  
fromBaseFont(bs:BaseFont, size:Number, style:int, color:RGBColor):Font
[static]
Font
  
getCalculatedBaseFont(specialEncoding:Boolean):BaseFont
Gets the BaseFont this class represents.
Font
  
getCalculatedLeading(linespacing:Number):Number
Font
  
Font
  
Font
  
getFamilyIndex(family:String):int
[static]
Font
  
getStyleValue(style:String):int
[static] Translates a String style value into the index value is used for this style
Font
Public Constants
 ConstantDefined By
  BOLD : int = 1
[static]
Font
  BOLDITALIC : int
[static]
Font
  COURIER : int = 0
[static]
Font
  DEFAULTSIZE : int = 12
[static]
Font
  HELVETICA : int = 1
[static]
Font
  ITALIC : int = 2
[static]
Font
  NORMAL : int = 0
[static]
Font
  STRIKETHRU : int = 8
[static]
Font
  SYMBOL : int = 3
[static]
Font
  TIMES_ROMAN : int = 2
[static]
Font
  UNDEFINED : int = -1
[static]
Font
  UNDERLINE : int = 4
[static]
Font
  ZAPFDINGBATS : int = 4
[static]
Font
Property Detail
baseFontproperty
baseFont:BaseFont


Implementation
    public function get baseFont():BaseFont
    public function set baseFont(value:BaseFont):void
colorproperty 
color:RGBColor


Implementation
    public function get color():RGBColor
    public function set color(value:RGBColor):void
familyproperty 
family:int


Implementation
    public function get family():int
    public function set family(value:int):void
familynameproperty 
familyname:String  [read-only]


Implementation
    public function get familyname():String
familyNameproperty 
familyName:String  [write-only]


Implementation
    public function set familyName(value:String):void
isBoldproperty 
isBold:Boolean  [read-only]


Implementation
    public function get isBold():Boolean
isItalicproperty 
isItalic:Boolean  [read-only]


Implementation
    public function get isItalic():Boolean
isStandardFontproperty 
isStandardFont:Boolean  [read-only]


Implementation
    public function get isStandardFont():Boolean
isStrikethruproperty 
isStrikethru:Boolean  [read-only]


Implementation
    public function get isStrikethru():Boolean
isUnderlineproperty 
isUnderline:Boolean  [read-only]


Implementation
    public function get isUnderline():Boolean
sizeproperty 
size:Number


Implementation
    public function get size():Number
    public function set size(value:Number):void
styleproperty 
style:int


Implementation
    public function get style():int
    public function set style(value:int):void
Constructor Detail
Font()Constructor
public function Font(family:int, size:Number, style:int, color:RGBColor = null, baseFont:BaseFont = null)

Parameters
family:int (default = NaN) — a combination of Font style ( eg: Font.UNDERLINE | Font.BOLD )
 
size:Number (default = NaN)
 
style:int (default = NaN)
 
color:RGBColor (default = null)
 
baseFont:BaseFont (default = null)
Method Detail
clone()method
public function clone():Object

Returns
Object
compareTo()method 
public function compareTo(o:Object):int

Parameters

o:Object

Returns
int
difference()method 
public function difference(font:Font):Font

Replaces the attributes that are equal to null with the attributes of a given font.

Parameters

font:Font

Returns
Font
fromBaseFont()method 
public static function fromBaseFont(bs:BaseFont, size:Number, style:int, color:RGBColor):Font

Parameters

bs:BaseFont
 
size:Number
 
style:int
 
color:RGBColor

Returns
Font
getCalculatedBaseFont()method 
public function getCalculatedBaseFont(specialEncoding:Boolean):BaseFont

Gets the BaseFont this class represents. For the built-in fonts a BaseFont is calculated.

Parameters

specialEncoding:Boolean

Returns
BaseFont
getCalculatedLeading()method 
public function getCalculatedLeading(linespacing:Number):Number

Parameters

linespacing:Number

Returns
Number
getCalculatedSize()method 
public function getCalculatedSize():Number

Returns
Number
getCalculatedStyle()method 
public function getCalculatedStyle():int

Returns
int
getFamilyIndex()method 
public static function getFamilyIndex(family:String):int

Parameters

family:String

Returns
int
getStyleValue()method 
public static function getStyleValue(style:String):int

Translates a String style value into the index value is used for this style

Parameters

style:String

Returns
int
Constant Detail
BOLDConstant
public static const BOLD:int = 1

BOLDITALICConstant 
public static const BOLDITALIC:int

COURIERConstant 
public static const COURIER:int = 0

DEFAULTSIZEConstant 
public static const DEFAULTSIZE:int = 12

HELVETICAConstant 
public static const HELVETICA:int = 1

ITALICConstant 
public static const ITALIC:int = 2

NORMALConstant 
public static const NORMAL:int = 0

STRIKETHRUConstant 
public static const STRIKETHRU:int = 8

SYMBOLConstant 
public static const SYMBOL:int = 3

TIMES_ROMANConstant 
public static const TIMES_ROMAN:int = 2

UNDEFINEDConstant 
public static const UNDEFINED:int = -1

UNDERLINEConstant 
public static const UNDERLINE:int = 4

ZAPFDINGBATSConstant 
public static const ZAPFDINGBATS:int = 4