From: Andreas Gal Date: Tue, 21 Jun 2011 07:42:01 +0000 (-0400) Subject: don't die when translating fonts without a charset X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=ec278e57242589119534d2464c19b7c74f20c0f0;p=pdf.js.git don't die when translating fonts without a charset --- diff --git a/pdf.js b/pdf.js index 57e5306..fda5b51 100644 --- 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)