From: notmasteryet Date: Sun, 2 Oct 2011 21:53:22 +0000 (-0500) Subject: Properly bypass Type3 fonts (ref #577) X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=34f438b77676080de9f01907a035a97647181dd8;p=pdf.js.git Properly bypass Type3 fonts (ref #577) --- diff --git a/pdf.js b/pdf.js index ae89849..4632ae9 100644 --- a/pdf.js +++ b/pdf.js @@ -4563,6 +4563,8 @@ var PartialEvaluator = (function partialEvaluator() { break; default: warn('Unknown type of font: ' + type); + baseEncoding = []; + break; } } @@ -4749,9 +4751,7 @@ var PartialEvaluator = (function partialEvaluator() { // This case is here for compatibility. var descriptor = xref.fetchIfRef(dict.get('FontDescriptor')); if (!descriptor) { - var baseFontName = dict.get('BaseFont'); - if (!isName(baseFontName)) - return null; + var baseFontName = dict.get('BaseFont') || new Name('sans-serif'); // Using base font name as a font name. baseFontName = baseFontName.name.replace(/,/g, '_');