[Pkg-javascript-commits] [pdf.js] 13/161: Fixes corrupted by Aspose fonts.
David Prévot
taffit at moszumanska.debian.org
Sat Apr 19 14:16:17 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository pdf.js.
commit 7dbd0887282d0bdc804961865fc1a513cbad1048
Author: Yury Delendik <ydelendik at mozilla.com>
Date: Tue Mar 11 14:16:27 2014 -0500
Fixes corrupted by Aspose fonts.
---
src/core/fonts.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/core/fonts.js b/src/core/fonts.js
index a567975..fb908e9 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -3387,6 +3387,12 @@ var Font = (function FontClosure() {
itemEncode(locaData, 0, writeOffset);
for (var i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) {
var endOffset = itemDecode(locaData, j);
+ if (endOffset > oldGlyfDataLength &&
+ ((oldGlyfDataLength + 3) & ~3) === endOffset) {
+ // Aspose breaks fonts by aligning the glyphs to the qword, but not
+ // the glyf table size, which makes last glyph out of range.
+ endOffset = oldGlyfDataLength;
+ }
if (endOffset > oldGlyfDataLength) {
// glyph end offset points outside glyf data, rejecting the glyph
itemEncode(locaData, j, writeOffset);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git
More information about the Pkg-javascript-commits
mailing list