PHPRtfLite::registerFont PHP Méthode

registerFont() public méthode

registers the font in color table and font table
public registerFont ( PHPRtfLite_Font $font )
$font PHPRtfLite_Font
    public function registerFont(PHPRtfLite_Font $font)
    {
        $font->setColorTable($this->getColorTable());
        $font->setFontTable($this->getFontTable());
    }

Usage Example

 /**
  * constructor
  *
  * @param   PHPRtfLite              $rtf
  * @param   PHPRtfLite_Font         $font
  * @param   PHPRtfLite_ParFormat    $parFormat
  */
 public function __construct(PHPRtfLite $rtf, PHPRtfLite_Font $font = null, PHPRtfLite_ParFormat $parFormat = null)
 {
     $this->_rtf = $rtf;
     $this->_font = $font;
     $this->_parFormat = $parFormat;
     if ($font) {
         $this->_rtf->registerFont($font);
     }
 }
All Usage Examples Of PHPRtfLite::registerFont