Prev StylesList |
ExcelExplorer Manual |
Next FontsList |
 |
(ExcelExplorer 4.0)
Get EEFont object for the font with specified index.
false EEFont Font( integer $index )
Parameters
- integer $index
- Font index.
Description
Returns EEFont object containing info about font (name, size, boldness, etc.) with specified index.
Font used in styles, individual cells, rich-text parts, phonetic records, etc.
This method can returns FALSE if font with specified index not found.
It also returns FALSE if file have been explored with option read_font set to FALSE.
So before using any methods of EEFont object you should always check if this function returns valid object.
Print font name and size with index 0 (default font used in Excel), if any
<?php
if( $ee->Font(0) ) {
echo 'Font family: '.$ee->Font(0)->Name()->UTF8()."\n";
echo 'Font size: '.($ee->Font(0)->Height() / 20)."pt \n";
}
?>
|