]> git.parisson.com Git - pdf.js.git/commitdiff
work around #233 so that tests stop failing for the moment
authorChris Jones <jones.chris.g@gmail.com>
Sun, 10 Jul 2011 05:12:42 +0000 (22:12 -0700)
committerChris Jones <jones.chris.g@gmail.com>
Sun, 10 Jul 2011 05:12:42 +0000 (22:12 -0700)
fonts.js

index 5b020e8992c82d6bfca9e0036e852ae37b10bd63..83475c67e0422046bd33d976980e76d8c115072d 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -1133,6 +1133,12 @@ var Font = (function() {
       for (var i = 0; i < chars.length; ++i) {
         var charcode = chars.charCodeAt(i);
         var unicode = encoding[charcode];
+        if ('undefined' == typeof(unicode)) {
+          // FIXME/issue 233: we're hitting this in test/pdf/sizes.pdf
+          // at the moment, for unknown reasons.
+          warn('Unencoded charcode '+ charcode);
+          unicode = charcode;
+        }
 
         // Check if the glyph has already been converted
         if (!IsNum(unicode))