diff --git a/src/core/fonts.js b/src/core/fonts.js index d3cfc11aa4d34..9db048959ee9c 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -1335,8 +1335,13 @@ var Font = (function FontClosure() { // name ArialBlack for example will be replaced by Helvetica. this.black = name.search(/Black/g) !== -1; + // Use 'name' instead of 'fontName' here because the original + // name ArialNarrow for example will be replaced by Helvetica. + const isNarrow = name.search(/Narrow/g) !== -1; + // if at least one width is present, remeasure all chars when exists - this.remeasure = !isStandardFont && Object.keys(this.widths).length > 0; + this.remeasure = + (!isStandardFont || isNarrow) && Object.keys(this.widths).length > 0; if ( (isStandardFont || isMappedToStandardFont) && type === "CIDFontType2" && diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index a827ae72c02a4..7dae93a0faf50 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -366,6 +366,7 @@ !issue6889.pdf !bug1001080.pdf !bug1671312_reduced.pdf +!bug1671312_ArialNarrow.pdf !issue6108.pdf !issue6113.pdf !openoffice.pdf diff --git a/test/pdfs/bug1671312_ArialNarrow.pdf b/test/pdfs/bug1671312_ArialNarrow.pdf new file mode 100644 index 0000000000000..ee887b3c48437 Binary files /dev/null and b/test/pdfs/bug1671312_ArialNarrow.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index abe1a6d30d0bb..5c00673ce78ff 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -2301,6 +2301,12 @@ "rounds": 1, "type": "eq" }, + { "id": "bug1671312_ArialNarrow", + "file": "pdfs/bug1671312_ArialNarrow.pdf", + "md5": "f4f0a0d1dc9276bd6e3402165ecdc3d7", + "rounds": 1, + "type": "eq" + }, { "id": "issue7020", "file": "pdfs/issue7020.pdf", "md5": "93b464e21c649e64ae92eeafe99fc31b",