Pop\Font\TrueType\Table\Cmap::__construct PHP 메소드

__construct() 공개 메소드

Instantiate a TTF 'cmap table object.
public __construct ( AbstractFont $font ) : Cmap
$font Pop\Font\AbstractFont
리턴 Cmap
    public function __construct(\Pop\Font\AbstractFont $font)
    {
        $bytePos = $font->tableInfo['cmap']->offset;
        // Get the CMAP header data.
        $cmapTableHeader = unpack('ntableVersion/' . 'nnumberOfTables', $font->read($bytePos, 4));
        $this->header = new \ArrayObject($cmapTableHeader, \ArrayObject::ARRAY_AS_PROPS);
        $this->parseSubTables($font);
    }