]> git.parisson.com Git - pdf.js.git/commitdiff
don't die when translating fonts without a charset
authorAndreas Gal <andreas.gal@gmail.com>
Tue, 21 Jun 2011 07:42:01 +0000 (03:42 -0400)
committerAndreas Gal <andreas.gal@gmail.com>
Tue, 21 Jun 2011 07:42:01 +0000 (03:42 -0400)
pdf.js

diff --git a/pdf.js b/pdf.js
index 57e53061fac7644aa03bf4d8dadb18a14a5bc0b8..fda5b512ec7103069fa01d398536014f85fd7381 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -2267,10 +2267,10 @@ var CanvasGraphics = (function() {
 
                     // Get the font charset if any
                     var charset = descriptor.get("CharSet");
-                    if (charset)
+                    if (charset) {
                         assertWellFormed(IsString(charset), "invalid charset");
-
-                    charset = charset.split("/");
+                        charset = charset.split("/");
+                    }
                 } else if (IsName(encoding)) {
                     var encoding = Encodings[encoding.name];
                     if (!encoding)