Docs For Class PHPExcel_Style_Font

PHPExcel_Style

# Class: PHPExcel_Style_Font

Source Location: /PHPExcel/Style/Font.php

### Class Overview

PHPExcel_Style_Font

#### Author(s):

#### Copyright:

- Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

Implements interfaces:

- PHPExcel_IComparable

### Constants

- UNDERLINE_DOUBLE
- UNDERLINE_DOUBLEACCOUNTING
- UNDERLINE_NONE
- UNDERLINE_SINGLE
- UNDERLINE_SINGLEACCOUNTING

### Methods

- __construct
- applyFromArray
- bindParent
- getActiveCell
- getActiveSheet
- getBold
- getColor
- getHashCode
- getIsSupervisor
- getItalic
- getName
- getSelectedCells
- getSharedComponent
- getSize
- getStrikethrough
- getStriketrough
- getStyleArray
- getSubScript
- getSuperScript
- getUnderline
- setBold
- setColor
- setItalic
- setName
- setSize
- setStrikethrough
- setStriketrough
- setSubScript
- setSuperScript
- setUnderline
- __clone

### Class Details

[line 36]
PHPExcel_Style_Font

#### Tags:

copyright: | Copyright (c) 2006 - 2011 PHPExcel (http://www.codeplex.com/PHPExcel)

[ Top ]

### Class Methods

### constructor __construct [line 132]

`PHPExcel_Style_Font __construct( [ $isSupervisor = false])`

Create a new PHPExcel_Style_Font

#### Tags:

access: | public

#### Parameters:

| $isSupervisor |

[ Top ]

### method applyFromArray [line 243]

`PHPExcel_Style_Font applyFromArray( [array $pStyles = null])`

Apply styles from array

1. $objPHPExcel-> getActiveSheet()->getStyle('B2')->getFont()-> applyFromArray(
2. array(
3. 'name' => 'Arial',
4. 'bold' => true,
5. 'italic' => false,
6. 'underline' => PHPExcel_Style_Font:: UNDERLINE_DOUBLE,
7. 'strike' => false,
8. 'color' => array(
9. 'rgb' => '808080'
10. )
11. )
12. );

#### Tags:

throws: | Exception
access: | public

#### Parameters:

array | $pStyles | Array containing style information

[ Top ]

### method bindParent [line 152]

`PHPExcel_Style_Font bindParent( PHPExcel_Style $parent)`

Bind parent. Only used for supervisor

#### Tags:

access: | public

#### Parameters:

PHPExcel_Style | $parent |

[ Top ]

### method getActiveCell [line 205]

`string getActiveCell( )`

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

#### Tags:

return: | E.g. 'A1'
access: | public

[ Top ]

### method getActiveSheet [line 183]

`PHPExcel_Worksheet getActiveSheet( )`

Get the currently active sheet. Only used for supervisor

#### Tags:

access: | public

[ Top ]

### method getBold [line 349]

`boolean getBold( )`

Get Bold

#### Tags:

access: | public

[ Top ]

### method getColor [line 558]

`PHPExcel_Style_Color getColor( )`

Get Color

#### Tags:

access: | public

[ Top ]

### method getHashCode [line 587]

`string getHashCode( )`

Get hash code

#### Tags:

return: | Hash code
access: | public

[ Top ]

### method getIsSupervisor [line 162]

`boolean getIsSupervisor( )`

Is this a supervisor or a real style component?

#### Tags:

access: | public

[ Top ]

### method getItalic [line 380]

`boolean getItalic( )`

Get Italic

#### Tags:

access: | public

[ Top ]

### method getName [line 287]

`string getName( )`

Get Name

#### Tags:

access: | public

[ Top ]

### method getSelectedCells [line 194]

`string getSelectedCells( )`

Get the currently active cell coordinate in currently active sheet.

Only used for supervisor

#### Tags:

return: | E.g. 'A1'
access: | public

[ Top ]

### method getSharedComponent [line 173]

`PHPExcel_Style_Font getSharedComponent( )`

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

Only used for style supervisor

#### Tags:

access: | public

[ Top ]

### method getSize [line 318]

`double getSize( )`

Get Size

#### Tags:

access: | public

[ Top ]

### method getStrikethrough [line 527]

`boolean getStrikethrough( )`

Get Strikethrough

#### Tags:

access: | public

[ Top ]

### method getStriketrough [line 507]

`boolean getStriketrough( )`

Get Striketrough

#### Tags:

deprecated: | Use getStrikethrough() instead.
access: | public

[ Top ]

### method getStyleArray [line 216]

`array getStyleArray( array $array)`

Build style array from subcomponents

#### Tags:

access: | public

#### Parameters:

array | $array |

[ Top ]

### method getSubScript [line 443]

`boolean getSubScript( )`

Get SubScript

#### Tags:

access: | public

[ Top ]

### method getSuperScript [line 411]

`boolean getSuperScript( )`

Get SuperScript

#### Tags:

access: | public

[ Top ]

### method getUnderline [line 475]

`string getUnderline( )`

Get Underline

#### Tags:

access: | public

[ Top ]

### method setBold [line 362]

`PHPExcel_Style_Font setBold( [boolean $pValue = false])`

Set Bold

#### Tags:

access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setColor [line 569]

`PHPExcel_Style_Font setColor( [PHPExcel_Style_Color $pValue = null])`

Set Color

#### Tags:

throws: | Exception
access: | public

#### Parameters:

PHPExcel_Style_Color | $pValue |

[ Top ]

### method setItalic [line 393]

`PHPExcel_Style_Font setItalic( [boolean $pValue = false])`

Set Italic

#### Tags:

access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setName [line 300]

`PHPExcel_Style_Font setName( [string $pValue = 'Calibri'])`

Set Name

#### Tags:

access: | public

#### Parameters:

string | $pValue |

[ Top ]

### method setSize [line 331]

`PHPExcel_Style_Font setSize( [double $pValue = 10])`

Set Size

#### Tags:

access: | public

#### Parameters:

double | $pValue |

[ Top ]

### method setStrikethrough [line 540]

`PHPExcel_Style_Font setStrikethrough( [boolean $pValue = false])`

Set Strikethrough

#### Tags:

access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setStriketrough [line 518]

`PHPExcel_Style_Font setStriketrough( [boolean $pValue = false])`

Set Striketrough

#### Tags:

deprecated: | Use setStrikethrough() instead.
access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setSubScript [line 456]

`PHPExcel_Style_Font setSubScript( [boolean $pValue = false])`

Set SubScript

#### Tags:

access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setSuperScript [line 424]

`PHPExcel_Style_Font setSuperScript( [boolean $pValue = false])`

Set SuperScript

#### Tags:

access: | public

#### Parameters:

boolean | $pValue |

[ Top ]

### method setUnderline [line 488]

`PHPExcel_Style_Font setUnderline( [string $pValue = PHPExcel_Style_Font::UNDERLINE_NONE])`

Set Underline

#### Tags:

access: | public

#### Parameters:

string | $pValue | PHPExcel_Style_Font underline type

[ Top ]

### method __clone [line 608]

`void __clone( )`

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

#### Tags:

access: | public

[ Top ]

### Class Constants

#### UNDERLINE_DOUBLE = 'double'

[line 40]

[ Top ]

#### UNDERLINE_DOUBLEACCOUNTING = 'doubleAccounting'

[line 41]

[ Top ]

#### UNDERLINE_NONE = 'none'

[line 39]

[ Top ]

#### UNDERLINE_SINGLE = 'single'

[line 42]

[ Top ]

#### UNDERLINE_SINGLEACCOUNTING = 'singleAccounting'

[line 43]

[ Top ]

Documentation generated on Sun, 27 Feb 2011 16:31:40 -0800 by phpDocumentor 1.4.3