Example #1
0
 /**
  * @param int $fontId
  *
  * @throws OutOfBoundsException
  * @return File
  */
 function getFont($fontId)
 {
     $this->parse();
     if (!isset($this->collectionOffsets[$fontId])) {
         throw new OutOfBoundsException();
     }
     if (isset($this->collection[$fontId])) {
         return $this->collection[$fontId];
     }
     $font = new File();
     $font->f = $this->f;
     $font->setTableOffset($this->collectionOffsets[$fontId]);
     return $this->collection[$fontId] = $font;
 }