Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Zend_Pdf_Resource_Font_Simple_Parsed Class Reference
Inheritance diagram for Zend_Pdf_Resource_Font_Simple_Parsed:
Zend_Pdf_Resource_Font_Simple Zend_Pdf_Resource_Font Zend_Pdf_Resource Zend_Pdf_Resource_Font_Simple_Parsed_TrueType

Public Member Functions

 __construct (Zend_Pdf_FileParser_Font_OpenType $fontParser)
 
- Public Member Functions inherited from Zend_Pdf_Resource_Font_Simple
 __construct ()
 
 glyphNumbersForCharacters ($characterCodes)
 
 glyphNumberForCharacter ($characterCode)
 
 getCoveredPercentage ($string, $charEncoding='')
 
 widthsForGlyphs ($glyphNumbers)
 
 widthForGlyph ($glyphNumber)
 
 encodeString ($string, $charEncoding)
 
 decodeString ($string, $charEncoding)
 
- Public Member Functions inherited from Zend_Pdf_Resource_Font
 __construct ()
 
 __toString ()
 
 getFontType ()
 
 getFontName ($nameType, $language, $characterSet=null)
 
 getFontNames ()
 
 isBold ()
 
 isItalic ()
 
 isMonospace ()
 
 getUnderlinePosition ()
 
 getUnderlineThickness ()
 
 getStrikePosition ()
 
 getStrikeThickness ()
 
 getUnitsPerEm ()
 
 getAscent ()
 
 getDescent ()
 
 getLineGap ()
 
 getLineHeight ()
 
 glyphNumbersForCharacters ($characterCodes)
 
 glyphNumberForCharacter ($characterCode)
 
 getCoveredPercentage ($string, $charEncoding='')
 
 widthsForGlyphs ($glyphNumbers)
 
 widthForGlyph ($glyphNumber)
 
 encodeString ($string, $charEncoding)
 
 decodeString ($string, $charEncoding)
 
 toEmSpace ($value)
 
- Public Member Functions inherited from Zend_Pdf_Resource
 __construct ($resource)
 
 __clone ()
 
 cloneResource ($factory, &$processed)
 
 getResource ()
 
 getFactory ()
 

Additional Inherited Members

- Protected Attributes inherited from Zend_Pdf_Resource_Font_Simple
 $_cmap = null
 
 $_glyphWidths = null
 
 $_missingGlyphWidth = 0
 
- Protected Attributes inherited from Zend_Pdf_Resource_Font
 $_fontType = Zend_Pdf_Font::TYPE_UNKNOWN
 
 $_fontNames = array()
 
 $_isBold = false
 
 $_isItalic = false
 
 $_isMonospace = false
 
 $_underlinePosition = 0
 
 $_underlineThickness = 0
 
 $_strikePosition = 0
 
 $_strikeThickness = 0
 
 $_unitsPerEm = 0
 
 $_ascent = 0
 
 $_descent = 0
 
 $_lineGap = 0
 
- Protected Attributes inherited from Zend_Pdf_Resource
 $_objectFactory
 
 $_resource
 

Detailed Description

Definition at line 43 of file Parsed.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Zend_Pdf_FileParser_Font_OpenType  $fontParser)

Object constructor

Parameters
Zend_Pdf_FileParser_Font_OpenType$fontParserFont parser object containing OpenType file.
Exceptions
Zend_Pdf_Exception

Definition at line 51 of file Parsed.php.

52  {
53  parent::__construct();
54 
55 
56  $fontParser->parse();
57 
58  /* Object properties */
59 
60  $this->_fontNames = $fontParser->names;
61 
62  $this->_isBold = $fontParser->isBold;
63  $this->_isItalic = $fontParser->isItalic;
64  $this->_isMonospaced = $fontParser->isMonospaced;
65 
66  $this->_underlinePosition = $fontParser->underlinePosition;
67  $this->_underlineThickness = $fontParser->underlineThickness;
68  $this->_strikePosition = $fontParser->strikePosition;
69  $this->_strikeThickness = $fontParser->strikeThickness;
70 
71  $this->_unitsPerEm = $fontParser->unitsPerEm;
72 
73  $this->_ascent = $fontParser->ascent;
74  $this->_descent = $fontParser->descent;
75  $this->_lineGap = $fontParser->lineGap;
76 
77  $this->_glyphWidths = $fontParser->glyphWidths;
78  $this->_missingGlyphWidth = $this->_glyphWidths[0];
79 
80 
81  $this->_cmap = $fontParser->cmap;
82 
83 
84  /* Resource dictionary */
85 
86  $baseFont = $this->getFontName(Zend_Pdf_Font::NAME_POSTSCRIPT, 'en', 'UTF-8');
87  $this->_resource->BaseFont = new Zend_Pdf_Element_Name($baseFont);
88 
89  $this->_resource->FirstChar = new Zend_Pdf_Element_Numeric(0);
90  $this->_resource->LastChar = new Zend_Pdf_Element_Numeric(count($this->_glyphWidths) - 1);
91 
92  /* Now convert the scalar glyph widths to Zend_Pdf_Element_Numeric objects.
93  */
94  $pdfWidths = array();
95  foreach ($this->_glyphWidths as $width) {
96  $pdfWidths[] = new Zend_Pdf_Element_Numeric($this->toEmSpace($width));
97  }
98  /* Create the Zend_Pdf_Element_Array object and add it to the font's
99  * object factory and resource dictionary.
100  */
101  $widthsArrayElement = new Zend_Pdf_Element_Array($pdfWidths);
102  $widthsObject = $this->_objectFactory->newObject($widthsArrayElement);
103  $this->_resource->Widths = $widthsObject;
104  }
getFontName($nameType, $language, $characterSet=null)
Definition: Font.php:224
const NAME_POSTSCRIPT
Definition: Font.php:224

The documentation for this class was generated from the following file: