]> git.parisson.com Git - pdf.js.git/commitdiff
Disable hinting until it works
authorVivien Nicolas <21@vingtetun.org>
Sat, 10 Sep 2011 18:00:27 +0000 (20:00 +0200)
committerVivien Nicolas <21@vingtetun.org>
Sat, 10 Sep 2011 18:00:27 +0000 (20:00 +0200)
fonts.js

index d283fc3d8596b800aa8802922f13cafaaceb0b02..a8498bf598d42be78c17d5eaa2e9e42421443352 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -12,6 +12,9 @@ var kMaxWaitForFontFace = 1000;
 // Unicode Private Use Area
 var kCmapGlyphOffset = 0xE000;
 
+// Until hinting is fully supported this constant can be used
+var kHintingEnabled = false;
+
 /**
  * Hold a map of decoded fonts and of the standard fourteen Type1
  * fonts and their acronyms.
@@ -1526,6 +1529,9 @@ var Type1Parser = function() {
               i++;
               continue;
             }
+          } else if (!kHintingEnabled && (value == 1 || value == 2)) {
+            charstring.push('drop', 'drop', 'drop', 'drop', 'drop', 'drop');
+            continue;
           }
 
           command = charStringDictionary['12'][escape];
@@ -1550,6 +1556,9 @@ var Type1Parser = function() {
 
             charstring.push(lsb, 'hmoveto');
             continue;
+          } else if (!kHintingEnabled && (value == 1 || value == 3)) {
+            charstring.push('drop', 'drop');
+            continue;
           }
           command = charStringDictionary[value];
         }