public function __construct(\Pop\Font\AbstractFont $font)
{
$bytePos = $font->tableInfo['loca']->offset;
$format = $font->header->indexToLocFormat == 1 ? 'N' : 'n';
$byteLength = $font->header->indexToLocFormat == 1 ? 4 : 2;
$multiplier = $font->header->indexToLocFormat == 1 ? 1 : 2;
for ($i = 0; $i < $font->numberOfGlyphs + 1; $i++) {
$ary = unpack($format . 'offset', $font->read($bytePos, $byteLength));
$this->offsets[$i] = $ary['offset'] * $multiplier;
$bytePos += $byteLength;
}
}