暫無描述

TableDirectoryEntry.php 735B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @package php-font-lib
  4. * @link https://github.com/PhenX/php-font-lib
  5. * @author Fabien Ménager <fabien.menager@gmail.com>
  6. * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
  7. */
  8. namespace FontLib\TrueType;
  9. use FontLib\Table\DirectoryEntry;
  10. /**
  11. * TrueType table directory entry.
  12. *
  13. * @package php-font-lib
  14. */
  15. class TableDirectoryEntry extends DirectoryEntry {
  16. function __construct(File $font) {
  17. parent::__construct($font);
  18. }
  19. function parse() {
  20. parent::parse();
  21. $font = $this->font;
  22. $this->checksum = $font->readUInt32();
  23. $this->offset = $font->readUInt32();
  24. $this->length = $font->readUInt32();
  25. $this->entryLength += 12;
  26. }
  27. }