Pop\Font\TrueType\Table\Hhea::__construct PHP Метод

__construct() публичный Метод

Instantiate a TTF 'hhea' table object.
public __construct ( AbstractFont $font ) : Hhea
$font Pop\Font\AbstractFont
Результат Hhea
    public function __construct(\Pop\Font\AbstractFont $font)
    {
        $bytePos = $font->tableInfo['hhea']->offset + 4;
        $ary = unpack('nascent/' . 'ndescent', $font->read($bytePos, 4));
        $ary = $font->shiftToSigned($ary);
        $this->ascent = $font->toEmSpace($ary['ascent']);
        $this->descent = $font->toEmSpace($ary['descent']);
        $bytePos = $font->tableInfo['hhea']->offset + 34;
        $ary = unpack('nnumberOfHMetrics/', $font->read($bytePos, 2));
        $this->numberOfHMetrics = $ary['numberOfHMetrics'];
    }