private function unmarshal($fontFile) { $ttf = new TTF(file_get_contents($fontFile)); $this->head = $ttf->unmarshalHead(); $this->indexToLocFormat = $this->head['indexToLocFormat']; $this->hhea = $ttf->unmarshalHhea(); $this->numberOfHMetrics = $this->hhea['numberOfHMetrics']; $this->maxp = $ttf->unmarshalMAXP(); $this->numGlyphs = $this->maxp['numGlyphs']; $this->orgCvt_Raw = $ttf->getTableRaw('cvt '); $this->orgPrepRaw = $ttf->getTableRaw('prep'); $this->orgFpgmRaw = $ttf->getTableRaw('fpgm'); $this->orgHmtx = $ttf->getTableRaw('hmtx'); //$this->hmtx = $ttf->unmarshalHmtx($this->numberOfHMetrics, $this->numGlyphs); $this->loca = $ttf->unmarshalLoca($this->indexToLocFormat, $this->numGlyphs); $this->glyf = $ttf->unmarshalGlyf($this->loca); $this->cmap = $ttf->unmarshalCmap(); $this->orgOS_2Raw = $ttf->getTableRaw('OS/2'); $this->orgNameRaw = $ttf->getTableRaw('name'); $this->post = $ttf->unmarshalPost(); }