From 6b31814032254e34ad630c2b50737972d7f26680 Mon Sep 17 00:00:00 2001 From: omochimetaru Date: Fri, 3 Jul 2026 20:49:32 +0900 Subject: [PATCH] fix empty CFF subset charset --- src/subset/CFFSubset.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/subset/CFFSubset.js b/src/subset/CFFSubset.js index d4506e7b..39678727 100644 --- a/src/subset/CFFSubset.js +++ b/src/subset/CFFSubset.js @@ -133,7 +133,7 @@ export default class CFFSubset extends Subset { let charset = { version: this.charstrings.length > 255 ? 2 : 1, - ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }] + ranges: this.charstrings.length > 1 ? [{ first: 1, nLeft: this.charstrings.length - 2 }] : [] }; let topDict = Object.assign({}, this.cff.topDict);