From 811f1b1d05593a5dac296d58d84047cf299a9acb Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Tue, 8 Apr 2014 22:49:51 +0200 Subject: [PATCH] Workaround for cases where FontName in the FontDescriptor differs from BaseFont in the Font (bug 847420) --- src/core/evaluator.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index d8ce942d7..e049333cb 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -1219,6 +1219,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { info('The FontDescriptor\'s FontName is "' + fontNameStr + '" but should be the same as the Font\'s BaseFont "' + baseFontStr + '"'); + // Workaround for cases where e.g. fontNameStr = 'Arial' and + // baseFontStr = 'Arial,Bold' (needed when no font file is embedded). + if (fontNameStr && baseFontStr && + baseFontStr.search(fontNameStr) === 0) { + fontName = baseFont; + } } } fontName = (fontName || baseFont);