diff -r 5b37998e522e -r 162c1de6545a web/lib/Zend/Pdf/Resource/Font/Simple/Parsed.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/lib/Zend/Pdf/Resource/Font/Simple/Parsed.php Fri Mar 11 15:05:35 2011 +0100 @@ -0,0 +1,105 @@ +parse(); + + /* Object properties */ + + $this->_fontNames = $fontParser->names; + + $this->_isBold = $fontParser->isBold; + $this->_isItalic = $fontParser->isItalic; + $this->_isMonospaced = $fontParser->isMonospaced; + + $this->_underlinePosition = $fontParser->underlinePosition; + $this->_underlineThickness = $fontParser->underlineThickness; + $this->_strikePosition = $fontParser->strikePosition; + $this->_strikeThickness = $fontParser->strikeThickness; + + $this->_unitsPerEm = $fontParser->unitsPerEm; + + $this->_ascent = $fontParser->ascent; + $this->_descent = $fontParser->descent; + $this->_lineGap = $fontParser->lineGap; + + $this->_glyphWidths = $fontParser->glyphWidths; + $this->_missingGlyphWidth = $this->_glyphWidths[0]; + + + $this->_cmap = $fontParser->cmap; + + + /* Resource dictionary */ + + $baseFont = $this->getFontName(Zend_Pdf_Font::NAME_POSTSCRIPT, 'en', 'UTF-8'); + $this->_resource->BaseFont = new Zend_Pdf_Element_Name($baseFont); + + $this->_resource->FirstChar = new Zend_Pdf_Element_Numeric(0); + $this->_resource->LastChar = new Zend_Pdf_Element_Numeric(count($this->_glyphWidths) - 1); + + /* Now convert the scalar glyph widths to Zend_Pdf_Element_Numeric objects. + */ + $pdfWidths = array(); + foreach ($this->_glyphWidths as $width) { + $pdfWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($width)); + } + /* Create the Zend_Pdf_Element_Array object and add it to the font's + * object factory and resource dictionary. + */ + $widthsArrayElement = new Zend_Pdf_Element_Array($pdfWidths); + $widthsObject = $this->_objectFactory->newObject($widthsArrayElement); + $this->_resource->Widths = $widthsObject; + } +}