From 14c999e3ee95c5314868b6e5323b1b441ef21817 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 26 Mar 2020 23:47:49 +0100 Subject: [PATCH] Remove the unused `sizes` and `encoding` properties on `Font` instances The `sizes` property doesn't appear to have been used ever since the code was first split into main/worker-threads, which is so many years ago that I wasn't able to easily find exactly in which PR/commit it became unused. The `encoding` property is always assigned the `properties.baseEncoding` value, however the `PartialEvaluator` doesn't actually compute/set that value any more. Again it was difficult to determine when it became unused, but it's been that way for years. --- src/core/fonts.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/fonts.js b/src/core/fonts.js index f8fe21b3d..c21387c45 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -523,7 +523,6 @@ var Font = (function FontClosure() { this.name = name; this.loadedName = properties.loadedName; this.isType3Font = properties.isType3Font; - this.sizes = []; this.missingFile = false; this.glyphCache = Object.create(null); @@ -652,7 +651,6 @@ var Font = (function FontClosure() { this.widths = properties.widths; this.defaultWidth = properties.defaultWidth; this.toUnicode = properties.toUnicode; - this.encoding = properties.baseEncoding; this.seacMap = properties.seacMap; } @@ -1253,7 +1251,6 @@ var Font = (function FontClosure() { name: null, font: null, mimetype: null, - encoding: null, disableFontFace: false, get renderer() {