We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 835a188 commit 39188c3Copy full SHA for 39188c3
src/FontLib/BinaryStream.php
@@ -185,6 +185,10 @@ public function readUInt16() {
185
return $a["n"];
186
}
187
188
+ public function readUInt16Many($count) {
189
+ return array_values(unpack("n*", $this->read($count * 2)));
190
+ }
191
+
192
public function readUFWord() {
193
return $this->readUInt16();
194
@@ -207,6 +211,17 @@ public function readInt16() {
207
211
return $v;
208
212
209
213
214
+ public function readInt16Many($count) {
215
+ $vals = array_values(unpack("n*", $this->read($count * 2)));
216
+ foreach ($vals as &$v) {
217
+ if ($v >= 0x8000) {
218
+ $v -= 0x10000;
219
220
221
222
+ return $vals;
223
224
210
225
public function readFWord() {
226
return $this->readInt16();
227
0 commit comments