]> git.parisson.com Git - pdf.js.git/commitdiff
Set a default font size identical for .notdef
authorVivien Nicolas <21@vingtetun.org>
Thu, 30 Jun 2011 01:24:07 +0000 (03:24 +0200)
committerVivien Nicolas <21@vingtetun.org>
Thu, 30 Jun 2011 01:24:07 +0000 (03:24 +0200)
fonts.js

index 1aee442c61bbe1ac2e9a054bf3038a1f97f989b0..a3f270c94d4a627598acdec6f8b3abf63e140cee 100644 (file)
--- a/fonts.js
+++ b/fonts.js
@@ -299,6 +299,7 @@ var Font = (function () {
 
         // Wrap the CFF data inside an OTF font file
         data = this.convert(name, cff, properties);
+        writeToFile(data, "/tmp/file." + fontName + "-" + fontCount + ".otf");
         break;
 
       case "TrueType":
@@ -922,7 +923,7 @@ var Font = (function () {
       * while Windows use this data. So be careful if you hack on Linux and
       * have to touch the 'hmtx' table
       */
-      hmtx = "\x00\x00\x00\x00"; // Fake .notdef
+      hmtx = "\x00\x8B\x00\x00"; // Fake .notdef
       var width = 0, lsb = 0;
       for (var i = 0; i < charstrings.length; i++) {
         var charstring = charstrings[i];
@@ -1635,7 +1636,7 @@ CFF.prototype = {
       charset.push(bytes[1]);
     }
 
-    var charstringsIndex = this.createCFFIndexHeader([[0x40, 0x0E]].concat(glyphs), true);
+    var charstringsIndex = this.createCFFIndexHeader([[0x8B, 0x0E]].concat(glyphs), true);
 
     //Top Dict Index
     var topDictIndex = [