PHP Class PhpOffice\PhpPresentation\Style\Font

Inheritance: implements PhpOffice\PhpPresentation\ComparableInterface
Show file Open project: phpoffice/phppowerpoint Class Usage Examples

Public Methods

Method Description
__construct ( ) Create a new \PhpOffice\PhpPresentation\Style\Font
getColor ( ) : Color | SchemeColor Get Color
getHashCode ( ) : string Get hash code
getHashIndex ( ) : string Get hash index
getName ( ) : string Get Name
getSize ( ) : double Get Size
getUnderline ( ) : string Get Underline
isBold ( ) : boolean Get Bold
isItalic ( ) : boolean Get Italic
isStrikethrough ( ) : boolean Get Strikethrough
isSubScript ( ) : boolean Get SubScript
isSuperScript ( ) : boolean Get SuperScript
setBold ( boolean $pValue = false ) : Font Set Bold
setColor ( Color | SchemeColor $pValue = null ) : Font Set Color
setHashIndex ( string $value ) Set hash index
setItalic ( boolean $pValue = false ) : Font Set Italic
setName ( string $pValue = 'Calibri' ) : Font Set Name
setSize ( float | integer $pValue = 10 ) : Font Set Size
setStrikethrough ( boolean $pValue = false ) : Font Set Strikethrough
setSubScript ( boolean $pValue = false ) : Font Set SubScript
setSuperScript ( boolean $pValue = false ) : Font Set SuperScript
setUnderline ( string $pValue = self::UNDERLINE_NONE ) : Font Set Underline

Method Details

__construct() public method

Create a new \PhpOffice\PhpPresentation\Style\Font
public __construct ( )

getColor() public method

Get Color
public getColor ( ) : Color | SchemeColor
return Color | SchemeColor

getHashCode() public method

Get hash code
public getHashCode ( ) : string
return string Hash code

getHashIndex() public method

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
public getHashIndex ( ) : string
return string Hash index

getName() public method

Get Name
public getName ( ) : string
return string

getSize() public method

Get Size
public getSize ( ) : double
return double

getUnderline() public method

Get Underline
public getUnderline ( ) : string
return string

isBold() public method

Get Bold
public isBold ( ) : boolean
return boolean

isItalic() public method

Get Italic
public isItalic ( ) : boolean
return boolean

isStrikethrough() public method

Get Strikethrough
public isStrikethrough ( ) : boolean
return boolean

isSubScript() public method

Get SubScript
public isSubScript ( ) : boolean
return boolean

isSuperScript() public method

Get SuperScript
public isSuperScript ( ) : boolean
return boolean

setBold() public method

Set Bold
public setBold ( boolean $pValue = false ) : Font
$pValue boolean
return Font

setColor() public method

Set Color
public setColor ( Color | SchemeColor $pValue = null ) : Font
$pValue Color | SchemeColor
return Font

setHashIndex() public method

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
public setHashIndex ( string $value )
$value string Hash index

setItalic() public method

Set Italic
public setItalic ( boolean $pValue = false ) : Font
$pValue boolean
return Font

setName() public method

Set Name
public setName ( string $pValue = 'Calibri' ) : Font
$pValue string
return Font

setSize() public method

Set Size
public setSize ( float | integer $pValue = 10 ) : Font
$pValue float | integer
return Font

setStrikethrough() public method

Set Strikethrough
public setStrikethrough ( boolean $pValue = false ) : Font
$pValue boolean
return Font

setSubScript() public method

Set SubScript
public setSubScript ( boolean $pValue = false ) : Font
$pValue boolean
return Font

setSuperScript() public method

Set SuperScript
public setSuperScript ( boolean $pValue = false ) : Font
$pValue boolean
return Font

setUnderline() public method

Set Underline
public setUnderline ( string $pValue = self::UNDERLINE_NONE ) : Font
$pValue string \PhpOffice\PhpPresentation\Style\Font underline type
return Font