diff --git a/src/FontLib/EOT/File.php b/src/FontLib/EOT/File.php index 55933eb..c9b4518 100644 --- a/src/FontLib/EOT/File.php +++ b/src/FontLib/EOT/File.php @@ -85,6 +85,15 @@ public function readUInt32() { return $uint32 >> 16 & 0x0000FFFF | $uint32 << 16 & 0xFFFF0000; } + + function setData($name, $key, $value) { + if (!$key) { + $this->header->data = $value; + } else { + $this->header->data[$key] = $value; + } + } + /** * Get font copyright * diff --git a/src/FontLib/TrueType/File.php b/src/FontLib/TrueType/File.php index 14e0181..4bf80e1 100644 --- a/src/FontLib/TrueType/File.php +++ b/src/FontLib/TrueType/File.php @@ -470,6 +470,14 @@ public function getData($name, $key = null) { } } + public function setData($name, $key, $value) { + if (!$key) { + $this->data[$name]->data = $value; + } else { + $this->data[$name]->data[$key] = $value; + } + } + function addDirectoryEntry(DirectoryEntry $entry) { $this->directory[$entry->tag] = $entry; }