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
This commit is contained in:
vyv03354 2013-03-03 21:30:08 +09:00
parent 233308e9eb
commit 999cac517a

View File

@ -1235,6 +1235,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
baseFont = new Name(baseFont); baseFont = new Name(baseFont);
} }
if (type.name !== 'Type3') {
var fontNameStr = fontName && fontName.name; var fontNameStr = fontName && fontName.name;
var baseFontStr = baseFont && baseFont.name; var baseFontStr = baseFont && baseFont.name;
if (fontNameStr !== baseFontStr) { if (fontNameStr !== baseFontStr) {
@ -1242,6 +1243,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
'" but should be the same as the Font\'s BaseFont "' + '" but should be the same as the Font\'s BaseFont "' +
baseFontStr + '"'); baseFontStr + '"');
} }
}
fontName = fontName || baseFont; fontName = fontName || baseFont;
assertWellFormed(isName(fontName), 'invalid font name'); assertWellFormed(isName(fontName), 'invalid font name');