| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* @package php-font-lib |
| 5 |
* @link https://github.com/dompdf/php-font-lib |
| 6 |
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License |
| 7 |
*/ |
| 8 |
namespace WCPOS\Vendor\FontLib; |
| 9 |
|
| 10 |
use WCPOS\Vendor\FontLib\TrueType\File; |
| 11 |
/** |
| 12 |
* Font header container. |
| 13 |
* |
| 14 |
* @package php-font-lib |
| 15 |
*/ |
| 16 |
abstract class Header extends BinaryStream |
| 17 |
{ |
| 18 |
/** |
| 19 |
* @var File |
| 20 |
*/ |
| 21 |
protected $font; |
| 22 |
protected $def = array(); |
| 23 |
public $data; |
| 24 |
public function __construct(File $font) |
| 25 |
{ |
| 26 |
$this->font = $font; |
| 27 |
} |
| 28 |
public function encode() |
| 29 |
{ |
| 30 |
return $this->font->pack($this->def, $this->data); |
| 31 |
} |
| 32 |
public function parse() |
| 33 |
{ |
| 34 |
$this->data = $this->font->unpack($this->def); |
| 35 |
} |
| 36 |
} |
| 37 |
|