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 9e032d9 commit a5c4d40Copy full SHA for a5c4d40
src/FontLib/Table/Type/kern.php
@@ -44,10 +44,15 @@ protected function _parse() {
44
$pairs = array();
45
$tree = array();
46
47
- for ($i = 0; $i < $subtable["nPairs"]; $i++) {
48
- $left = $font->readUInt16();
49
- $right = $font->readUInt16();
50
- $value = $font->readInt16();
+ $values = $font->readUInt16Many($subtable["nPairs"] * 3);
+ for ($i = 0, $idx = 0; $i < $subtable["nPairs"]; $i++) {
+ $left = $values[$idx++];
+ $right = $values[$idx++];
51
+ $value = $values[$idx++];
52
+
53
+ if ($value >= 0x8000) {
54
+ $value -= 0x10000;
55
+ }
56
57
$pairs[] = array(
58
"left" => $left,
0 commit comments