Example #1
0
File: Type0.php Project: stunti/zf2
 /**
  * Object constructor
  *
  */
 public function __construct(CIDFont\AbstractCIDFont $descendantFont)
 {
     parent::__construct();
     $this->_objectFactory->attach($descendantFont->getFactory());
     $this->_fontType = 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 InternalType\NameObject('Type0');
     $this->_resource->BaseFont = new InternalType\NameObject($descendantFont->getResource()->BaseFont->value);
     $this->_resource->DescendantFonts = new InternalType\ArrayObject(array($descendantFont->getResource()));
     $this->_resource->Encoding = new InternalType\NameObject('Identity-H');
     $toUnicode = $this->_objectFactory->newStreamObject(self::getToUnicodeCMapData());
     $this->_resource->ToUnicode = $toUnicode;
 }