]> git.parisson.com Git - pdf.js.git/commitdiff
Add some missing glyphs
authorVivien Nicolas <21@vingtetun.org>
Sun, 12 Jun 2011 21:41:57 +0000 (23:41 +0200)
committerVivien Nicolas <21@vingtetun.org>
Sun, 12 Jun 2011 21:41:57 +0000 (23:41 +0200)
PDFFont.js
glyphlist.js

index 468b86ba16be5310d5207ee9a5a94d5ec2de9f09..84fdf94b140f66cc17a3ec9ca6cbfb7025b7ae66 100644 (file)
@@ -929,7 +929,7 @@ Type1Font.prototype = {
     var familyName = fontInfo.get("FamilyName");
     var weight = fontInfo.get("Weight");
     var strings = [version, notice, fullName,
-                   familyName, weight];
+                   familyName, weight, "asteriskmath"];
     var stringsIndex = this.createCFFIndexHeader(strings);
     var stringsDataLength = stringsIndex.length;
 
@@ -940,6 +940,8 @@ Type1Font.prototype = {
     var charset = [0x00];
     for (var i = 0; i < glyphs.length; i++) {
       var index = CFFStrings.indexOf(charstrings[i].glyph);
+      if (index == -1)
+        index = CFFStrings.length + strings.indexOf(glyph);
       var bytes = this.integerToBytes(index, 2);
       charset.push(bytes[0]);
       charset.push(bytes[1]);
@@ -1103,6 +1105,10 @@ Type1Font.prototype = {
     for (var i = 1; i < maxPower; i++)
       value *= 2;
 
+    if (fontCount == 5) {
+      log ("mp2: " + aNumber + "::" + value);
+    }
+
     return value;
   },
 
@@ -1474,7 +1480,7 @@ Type1Font.prototype = {
     for (var i = 0; i < currentOffset; i++)
       fontData.push(otf[i]);
 
-    //writeToFile(fontData, "/tmp/pdf.js." + fontCount + ".otf");
+    writeToFile(fontData, "/tmp/pdf.js." + fontCount + ".otf");
     return fontData;
   }
 };
index de07af4a5571d989d6ecb0f73cb1b65e0a789b88..e147f6c8a5f77f6350482cc59cb7fa11bd953e8a 100644 (file)
@@ -4279,5 +4279,11 @@ var GlyphsUnicode = {
   zretroflexhook: "0290",
   zstroke: "01B6",
   zuhiragana: "305A",
-  zukatakana: "30BA",
+  zukatakana: "30BA"
 };
+
+// Add missing glyphs from the original Adobe's list
+GlyphsUnicode["angbracketleft"] = "3008";
+GlyphsUnicode["angbracketright"] = "3009";
+GlyphsUnicode["circlecopyrt"] = "00A9";
+