Ejemplo n.º 1
0
 /**
  * Object constructor
  *
  */
 public function __construct(Zend_Pdf_Resource_Font_CidFont $descendantFont)
 {
     parent::__construct();
     $this->_objectFactory->attach($descendantFont->getFactory());
     $this->_fontType = Zend_Pdf_Font::TYPE_TYPE_0;
     $this->_descendantFont = $descendantFont;
     $this->_fontNames = $descendantFont->getFontNames();
     $this->_isBold = $descendantFont->isBold();
     $this->_isItalic = $descendantFont->isItalic();
     $this->_isMonospaced = $descendantFont->isMonospace();
     $this->_underlinePosition = $descendantFont->getUnderlinePosition();
     $this->_underlineThickness = $descendantFont->getUnderlineThickness();
     $this->_strikePosition = $descendantFont->getStrikePosition();
     $this->_strikeThickness = $descendantFont->getStrikeThickness();
     $this->_unitsPerEm = $descendantFont->getUnitsPerEm();
     $this->_ascent = $descendantFont->getAscent();
     $this->_descent = $descendantFont->getDescent();
     $this->_lineGap = $descendantFont->getLineGap();
     $this->_resource->Subtype = new Zend_Pdf_Element_Name('Type0');
     $this->_resource->BaseFont = new Zend_Pdf_Element_Name($descendantFont->getResource()->BaseFont->value);
     $this->_resource->DescendantFonts = new Zend_Pdf_Element_Array(array($descendantFont->getResource()));
     $this->_resource->Encoding = new Zend_Pdf_Element_Name('Identity-H');
     $toUnicode = $this->_objectFactory->newStreamObject(self::getToUnicodeCMapData());
     $this->_resource->ToUnicode = $toUnicode;
 }