PHPExcel_Style_Font

category | PHPExcel
package | PHPExcel_Style
copyright | Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel)

### Methods

## Implement PHP __clone to create a deep clone, not just a shallow copy.

    __clone()

Inherited

inherited_from | \PHPExcel_Style_Supervisor::__clone()

## Create a new PHPExcel_Style_Font

    __construct(boolean $isSupervisor, boolean $isConditional)

### Parameters

#### $isSupervisor

`boolean`

Flag indicating if this is a supervisor or not Leave this value at default unless you understand exactly what its ramifications are

#### $isConditional

`boolean`

Flag indicating if this is a conditional style or not Leave this value at default unless you understand exactly what its ramifications are

## Apply styles from array

    applyFromArray(array $pStyles) : \PHPExcel_Style_Font

    $objPHPExcel->getActiveSheet()->getStyle('B2')->getFont()->applyFromArray(
        array(
            'name'      => 'Arial',
            'bold'      => TRUE,
            'italic'    => FALSE,
            'underline' => PHPExcel_Style_Font::UNDERLINE_DOUBLE,
            'strike'    => FALSE,
            'color'     => array(
                'rgb' => '808080'
            )
        )
    );

### Parameters

#### $pStyles

`array`

Array containing style information

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Font`

## Bind parent.

    bindParent(\PHPExcel $parent, $parentPropertyName) : \PHPExcel_Style_Supervisor

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::bindParent()

### Parameters

#### $parent

`\PHPExcel`

#### $parentPropertyName

### Returns

`\PHPExcel_Style_Supervisor`

## Get the currently active cell coordinate in currently active sheet.

    getActiveCell() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveCell()

### Returns

`string`E.g. 'A1'

## Get the currently active sheet.

    getActiveSheet() : \PHPExcel_Worksheet

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getActiveSheet()

### Returns

`\PHPExcel_Worksheet`

## Get Bold

    getBold() : boolean

### Returns

`boolean`

## Get Color

    getColor() : \PHPExcel_Style_Color

### Returns

`\PHPExcel_Style_Color`

## Get hash code

    getHashCode() : string

### Returns

`string`Hash code

## Is this a supervisor or a cell style component?

    getIsSupervisor() : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::getIsSupervisor()

### Returns

`boolean`

## Get Italic

    getItalic() : boolean

### Returns

`boolean`

## Get Name

    getName() : string

### Returns

`string`

## Get the currently active cell coordinate in currently active sheet.

    getSelectedCells() : string

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::getSelectedCells()

### Returns

`string`E.g. 'A1'

## Get the shared style component for the currently active cell in currently active sheet.

    getSharedComponent() : \PHPExcel_Style_Font

Only used for style supervisor

### Returns

`\PHPExcel_Style_Font`

## Get Size

    getSize() : double

### Returns

`double`

## Get Strikethrough

    getStrikethrough() : boolean

### Returns

`boolean`

## Build style array from subcomponents

    getStyleArray(array $array) : array

### Parameters

#### $array

`array`

### Returns

`array`

## Get SubScript

    getSubScript() : boolean

### Returns

`boolean`

## Get SuperScript

    getSuperScript() : boolean

### Returns

`boolean`

## Get Underline

    getUnderline() : string

### Returns

`string`

## Set Bold

    setBold(boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`boolean`

### Returns

`\PHPExcel_Style_Font`

## Set Color

    setColor(\PHPExcel_Style_Color $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`\PHPExcel_Style_Color`

### Exceptions

`\PHPExcel_Exception` |

### Returns

`\PHPExcel_Style_Font`

## Set Italic

    setItalic(boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`boolean`

### Returns

`\PHPExcel_Style_Font`

## Set Name

    setName(string $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`string`

### Returns

`\PHPExcel_Style_Font`

## Set Size

    setSize(double $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`double`

### Returns

`\PHPExcel_Style_Font`

## Set Strikethrough

    setStrikethrough(boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`boolean`

### Returns

`\PHPExcel_Style_Font`

## Set SubScript

    setSubScript(boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`boolean`

### Returns

`\PHPExcel_Style_Font`

## Set SuperScript

    setSuperScript(boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`boolean`

### Returns

`\PHPExcel_Style_Font`

## Set Underline

    setUnderline(string | boolean $pValue) : \PHPExcel_Style_Font

### Parameters

#### $pValue

`string` `boolean`

PHPExcel_Style_Font underline type If a boolean is passed, then TRUE equates to UNDERLINE_SINGLE, false equates to UNDERLINE_NONE

### Returns

`\PHPExcel_Style_Font`

### Properties

##

    $_bold : boolean

##

    $_color : \PHPExcel_Style_Color

##

    $_isSupervisor : boolean

Inherited

inherited_from | \PHPExcel_Style_Supervisor::$$_isSupervisor

##

    $_italic : boolean

##

    $_name : string

##

    $_parent : \PHPExcel_Style

Inherited

Only used for supervisor

inherited_from | \PHPExcel_Style_Supervisor::$$_parent

##

    $_size : float

##

    $_strikethrough : boolean

##

    $_subScript : boolean

##

    $_superScript : boolean

##

    $_underline : string

### Constants

## UNDERLINE_DOUBLE

    UNDERLINE_DOUBLE

## UNDERLINE_DOUBLEACCOUNTING

    UNDERLINE_DOUBLEACCOUNTING

## UNDERLINE_NONE

    UNDERLINE_NONE

## UNDERLINE_SINGLE

    UNDERLINE_SINGLE

## UNDERLINE_SINGLEACCOUNTING

    UNDERLINE_SINGLEACCOUNTING