From cfdb597e4a2274c9882a2192a4dcf9601fbb4f7b Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 27 Jul 2018 16:19:57 +0200 Subject: [PATCH] Ensure that the `CIDSystemInfo` strings, in Type0 fonts, are correctly decoded This isn't directly related to the subsequent patch, but just something that I happened to notice while poking around in the font code. --- src/core/evaluator.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/evaluator.js b/src/core/evaluator.js index ff6699cf8..d7bccc401 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -16,8 +16,8 @@ import { AbortException, assert, CMapCompressionType, createPromiseCapability, FONT_IDENTITY_MATRIX, FormatError, getLookupTableFactory, IDENTITY_MATRIX, - info, isNum, isString, NativeImageDecoding, OPS, TextRenderingMode, - UNSUPPORTED_FEATURES, Util, warn + info, isNum, isString, NativeImageDecoding, OPS, stringToPDFString, + TextRenderingMode, UNSUPPORTED_FEATURES, Util, warn } from '../shared/util'; import { CMapFactory, IdentityCMap } from './cmap'; import { DecodeStream, Stream } from './stream'; @@ -1871,8 +1871,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var cidSystemInfo = dict.get('CIDSystemInfo'); if (isDict(cidSystemInfo)) { properties.cidSystemInfo = { - registry: cidSystemInfo.get('Registry'), - ordering: cidSystemInfo.get('Ordering'), + registry: stringToPDFString(cidSystemInfo.get('Registry')), + ordering: stringToPDFString(cidSystemInfo.get('Ordering')), supplement: cidSystemInfo.get('Supplement'), }; }