]> git.parisson.com Git - pdf.js.git/commitdiff
Revert "Merge branch 'writeToFile' into hmm"
authorsbarman <sbarman@L3CWZ5T.(none)>
Wed, 17 Aug 2011 23:00:54 +0000 (16:00 -0700)
committersbarman <sbarman@L3CWZ5T.(none)>
Wed, 17 Aug 2011 23:00:54 +0000 (16:00 -0700)
This reverts commit 9b91fca34702e37b7f6d7eb958e8d70f51b2602d, reversing
changes made to c592d5ed3b8a95a4392996f1222943645553d7ae.

fonts.js
utils/fonts_utils.js
web/viewer.html

index a55fc63a27e41071349c3295c75c60ac7fb54b5f..a4976b0ac9ba02b2d4b6a6517bfb99ef7bf6a5fc 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -446,15 +446,6 @@ var Font = (function Font() {
         break;
     }
 
-    var fileArr = [];
-    file.reset();
-    file = file.getBytes();
-    for (var i = 0, ii = file.length; i < ii; ++i)
-      fileArr.push(file[i]);
-
-    writeToFile(data, '/tmp/' + name + '_new');
-    writeToFile(fileArr, '/tmp/' + name + '_orig');
-
     this.data = data;
     this.type = properties.type;
     this.textMatrix = properties.textMatrix;
index 98ea607577c5f890d856601ad111b336f018b5bb..edfc221863187ec17ca91dfbc04f40dee3ddb3b9 100644 (file)
@@ -1,6 +1,8 @@
 /* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /
 /* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
 
+'use strict';
+
 /**
  * The Type2 reader code below is only used for debugging purpose since Type2
  * is only a CharString format and is never used directly as a Font file.
@@ -389,7 +391,7 @@ function writeToFile(aBytes, aFilePath) {
 
   var stream = Cc['@mozilla.org/network/file-output-stream;1']
                  .createInstance(Ci.nsIFileOutputStream);
-  stream.init(file, 0x04 | 0x08 | 0x20, 0666, 0);
+  stream.init(file, 0x04 | 0x08 | 0x20, 0x180, 0);
 
   var bos = Cc['@mozilla.org/binaryoutputstream;1']
               .createInstance(Ci.nsIBinaryOutputStream);
index 5498d8a1cb86c365aa8395a7dfcb223810690a43..285dadb015deda9adb3afad35bbd0bdf9ffb02e6 100644 (file)
@@ -10,7 +10,6 @@
         <script type="text/javascript" src="../fonts.js"></script>
         <script type="text/javascript" src="../crypto.js"></script>
         <script type="text/javascript" src="../glyphlist.js"></script>
-        <script type="text/javascript" src="../utils/fonts_utils.js"></script>
   </head>
 
   <body>