Merge pull request #13589 from Snuffleupagus/issue-13585

Allow using the standard font data for non-Type1 fonts (issue 13585, PR 12726 follow-up)
This commit is contained in:
Tim van der Meij 2021-06-20 12:31:39 +02:00 committed by GitHub
commit bdfcdd6f83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3143,7 +3143,7 @@ class PartialEvaluator {
// Heuristic: we have to check if the font is a standard one also
if (isSymbolicFont) {
encoding = MacRomanEncoding;
if (!properties.file) {
if (!properties.file || properties.isInternalFont) {
if (/Symbol/i.test(properties.name)) {
encoding = SymbolSetEncoding;
} else if (/Dingbats|Wingdings/i.test(properties.name)) {
@ -3791,6 +3791,7 @@ class PartialEvaluator {
isType3Font,
};
const widths = dict.get("Widths");
const standardFontName = getStandardFontName(baseFontName);
let file = null;
if (standardFontName) {
@ -3889,7 +3890,7 @@ class PartialEvaluator {
isInternalFont = !!fontFile;
type = "TrueType";
}
} else if (type === "Type1") {
} else if (!isType3Font) {
const standardFontName = getStandardFontName(fontName.name);
if (standardFontName) {
isStandardFont = true;