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 bccb423 commit 18de7b3Copy full SHA for 18de7b3
src/FontLib/Table/Type/hmtx.php
@@ -25,9 +25,10 @@ protected function _parse() {
25
$font->seek($offset);
26
27
$data = array();
28
- for ($gid = 0; $gid < $numOfLongHorMetrics; $gid++) {
29
- $advanceWidth = $font->readUInt16();
30
- $leftSideBearing = $font->readUInt16();
+ $metrics = $font->readUInt16Many($numOfLongHorMetrics * 2);
+ for ($gid = 0, $mid = 0; $gid < $numOfLongHorMetrics; $gid++) {
+ $advanceWidth = $metrics[$mid++];
31
+ $leftSideBearing = $metrics[$mid++];
32
$data[$gid] = array($advanceWidth, $leftSideBearing);
33
}
34
0 commit comments