%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php /** * @package php-font-lib * @link https://github.com/PhenX/php-font-lib * @author Fabien Ménager <fabien.menager@gmail.com> * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License */ /** * `hmtx` font table. * * @package php-font-lib */ class Font_Table_hmtx extends Font_Table { protected function _parse(){ $font = $this->getFont(); $offset = $font->pos(); $numOfLongHorMetrics = $font->getData("hhea", "numOfLongHorMetrics"); $numGlyphs = $font->getData("maxp", "numGlyphs"); $font->seek($offset); $data = array(); for($gid = 0; $gid < $numOfLongHorMetrics; $gid++) { $advanceWidth = $font->readUInt16(); $leftSideBearing = $font->readUInt16(); $data[$gid] = array($advanceWidth, $leftSideBearing); } if($numOfLongHorMetrics < $numGlyphs){ $lastWidth = end($data); $data = array_pad($data, $numGlyphs, $lastWidth); } $this->data = $data; } protected function _encode() { $font = $this->getFont(); $subset = $font->getSubset(); $data = $this->data; $length = 0; foreach($subset as $gid) { $length += $font->writeUInt16($data[$gid][0]); $length += $font->writeUInt16($data[$gid][1]); } return $length; } }