From 999cac517af6ef90cabca819ba0146b3e43dd300 Mon Sep 17 00:00:00 2001 From: vyv03354 Date: Sun, 3 Mar 2013 21:30:08 +0900 Subject: [PATCH] Skip FontName vs. BaseFont check for Type 3 fonts Type 3 font dict does not have a BaseFont entry (see PDF Reference 9.6.5 Table 112). This check is actually causing false positives: http://math.berkeley.edu/~daisuke/Bonn2013.pdf http://math.berkeley.edu/~daisuke/BVSOL.pdf http://www.ieice-hbkb.org/files/06/06gun_02hen_04.pdf http://www.asahi-net.or.jp/~td6i-st/fuku-cathedral/new/gat.pdf --- src/evaluator.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/evaluator.js b/src/evaluator.js index 28f5d8430..ec076a273 100644 --- a/src/evaluator.js +++ b/src/evaluator.js @@ -1235,12 +1235,14 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { baseFont = new Name(baseFont); } - var fontNameStr = fontName && fontName.name; - var baseFontStr = baseFont && baseFont.name; - if (fontNameStr !== baseFontStr) { - warn('The FontDescriptor\'s FontName is "' + fontNameStr + - '" but should be the same as the Font\'s BaseFont "' + - baseFontStr + '"'); + if (type.name !== 'Type3') { + var fontNameStr = fontName && fontName.name; + var baseFontStr = baseFont && baseFont.name; + if (fontNameStr !== baseFontStr) { + warn('The FontDescriptor\'s FontName is "' + fontNameStr + + '" but should be the same as the Font\'s BaseFont "' + + baseFontStr + '"'); + } } fontName = fontName || baseFont;