/** * Set current font. * * @param Zend_Pdf_Font $font * @param float $fontSize */ public function setFont(Zend_Pdf_Font $font, $fontSize) { $this->_addProcSet('Text'); $fontName = $this->_attachResource('Font', $font->getResource()); $this->_font = $font; $this->_fontSize = $fontSize; $fontNameObj = new Zend_Pdf_Element_Name($fontName); $fontSizeObj = new Zend_Pdf_Element_Numeric($fontSize); $this->_contents .= $fontNameObj->toString() . ' ' . $fontSizeObj->toString() . " Tf\n"; }