Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4546f06

Browse files
committed
Set the head table checkSumAdjustment to zero
...before calculating the head table checksum. Per the head table specification: > checkSumAdjustment: To compute set it to 0, calculate the checksum for the 'head' table and put it in the table directory, sum the entire font as a uint32_t, then store 0xB1B0AFBA - sum. (The checksum for the 'head' table will be wrong as a result. That is OK; do not reset it.) ref #123
1 parent 433a4fe commit 4546f06

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/FontLib/Table/Type/head.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ protected function _parse() {
4343
throw new Exception("Incorrect magic number (" . dechex($this->data["magicNumber"]) . ")");
4444
}
4545
}
46+
47+
function _encode() {
48+
$this->data["checkSumAdjustment"] = 0;
49+
return parent::_encode();
50+
}
4651
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /