public function _addFont(PHPExcel_Style_Font $font)
	{
		$fontHashCode = $font->getHashCode();
		if(isset($this->_addedFonts[$fontHashCode])){
			$fontIndex = $this->_addedFonts[$fontHashCode];
		} else {
			$countFonts = count($this->_fontWriters);
			$fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1;

			$fontWriter = new PHPExcel_Writer_Excel5_Font($font);
			$fontWriter->setColorIndex($this->_addColor($font->getColor()->getRGB()));
			$this->_fontWriters[] = $fontWriter;

			$this->_addedFonts[$fontHashCode] = $fontIndex;
		}
		return $fontIndex;
	}
public function _addFont(PHPExcel_Style_Font $font)
	{
		$fontHashCode = $font->getHashCode();
		if(isset($this->_addedFonts[$fontHashCode])){
			$fontIndex = $this->_addedFonts[$fontHashCode];
		} else {
			$countFonts = count($this->_fontWriters);
			$fontIndex = ($countFonts < 4) ? $countFonts : $countFonts + 1;

			$fontWriter = new PHPExcel_Writer_Excel5_Font($font);
			$fontWriter->setColorIndex($this->_addColor($font->getColor()->getRGB()));
			$this->_fontWriters[] = $fontWriter;

			$this->_addedFonts[$fontHashCode] = $fontIndex;
		}
		return $fontIndex;
	}
public function _addFont ( PHPExcel_Style_Font $ font ) { $ fontHashCode = $ font -> getHashCode ( ) ; if ( isset ( $ this -> _addedFonts [ $ fontHashCode ] ) ) { $ fontIndex = $ this -> _addedFonts [ $ fontHashCode ] ; } else { $ countFonts = count ( $ this -> _fontWriters ) ; $ fontIndex = ( $ countFonts < 4 ) ? $ countFonts : $ countFonts + 1 ; $ fontWriter = new PHPExcel_Writer_Excel5_Font ( $ font ) ; $ fontWriter -> setColorIndex ( $ this -> _addColor ( $ font -> getColor ( ) -> getRGB ( ) ) ) ; $ this -> _fontWriters [ ] = $ fontWriter ; $ this -> _addedFonts [ $ fontHashCode ] = $ fontIndex ; } return $ fontIndex ; }
Add a font to added fonts

@param PHPExcel_Style_Font $font
@return int Index to FONT record
Add a font to added fonts