]> git.parisson.com Git - pdf.js.git/commitdiff
increased size of loaded font
authorsbarman <sbarman@L3CWZ5T.(none)>
Thu, 18 Aug 2011 18:28:37 +0000 (11:28 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Thu, 18 Aug 2011 18:28:37 +0000 (11:28 -0700)
fonts.js

index 1860df2e562e2d6046a712fe4a7a5e8b39d9948f..2c737b050bf0cc3f538baff987149eea61bfadeb 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -975,7 +975,7 @@ var Font = (function Font() {
 
       // Create a new file to hold the new version of our truetype with a new
       // header and new offsets
-      var ttf = new Uint8Array(kMaxFontFileSize);
+      var ttf = new Uint8Array(kMaxFontFileSize*3);
 
       // The offsets object holds at the same time a representation of where
       // to write the table entry information about a table and another offset
@@ -1102,6 +1102,8 @@ var Font = (function Font() {
       for (var i = 0; i < tables.length; i++) {
         var table = tables[i];
         var tableData = table.data;
+        if (tableData.length + offsets.currentOffset > ttf.length)
+          log('blah');
         ttf.set(tableData, offsets.currentOffset);
         offsets.currentOffset += tableData.length;