diff --git a/src/core/fonts.js b/src/core/fonts.js index 38ebbf18c..09fafec1c 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -1272,7 +1272,7 @@ var Font = (function FontClosure() { var name = this.name; var type = this.type; var subtype = this.subtype; - var fontName = name.replace(/[,_]/g, "-"); + let fontName = name.replace(/[,_]/g, "-").replace(/\s/g, ""); var stdFontMap = getStdFontMap(), nonStdFontMap = getNonStdFontMap(); var isStandardFont = diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 367ff3ae2..479ae2c6c 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -88,6 +88,7 @@ !issue11242_reduced.pdf !issue11279.pdf !issue11362.pdf +!issue11578_reduced.pdf !bad-PageLabels.pdf !decodeACSuccessive.pdf !filled-background.pdf diff --git a/test/pdfs/issue11578_reduced.pdf b/test/pdfs/issue11578_reduced.pdf new file mode 100644 index 000000000..176cbda9d --- /dev/null +++ b/test/pdfs/issue11578_reduced.pdf @@ -0,0 +1,98 @@ +%PDF-1.7 +%âãÏÓ +1 0 obj +<< +/Kids [2 0 R] +/Count 1 +/Type /Pages +>> +endobj +2 0 obj +<< +/Parent 1 0 R +/MediaBox [0 0 200 50] +/Resources +<< +/Font +<< +/F5 3 0 R +>> +>> +/Contents 4 0 R +/Type /Page +>> +endobj +5 0 obj +<< +/Pages 1 0 R +/Type /Catalog +>> +endobj +3 0 obj +<< +/BaseFont /Times#20New#20Roman +/DescendantFonts [6 0 R] +/Subtype /Type0 +/Encoding /Identity-H +/Type /Font +>> +endobj +4 0 obj +<< +/Length 63 +>> +stream +BT +10 20 TD +/F5 20 Tf +<00390052004f00580050004800560003> Tj +ET + +endstream +endobj +7 0 obj +<< +/FontName /Times#20New#20Roman +/StemV 0 +/Ascent 693 +/Flags 32 +/Descent -216 +/ItalicAngle 0 +/FontBBox [-568 -307 2046 1040] +/Type /FontDescriptor +/CapHeight 0 +>> +endobj +6 0 obj +<< +/BaseFont /Times#20New#20Roman +/CIDSystemInfo +<< +/Supplement 0 +/Ordering (Identity) +/Registry (Adobe) +>> +/Subtype /CIDFontType2 +/FontDescriptor 7 0 R +/W [3 [250] 36 [722.168] 39 [722.168] 48 [889.16] 51 [556.152] 55 [575.684] 57 [593.262] 68 [443.848] 70 [443.848] 71 [500] 72 [443.848] 76 [277.832] 79 [277.832] 80 [777.832] 81 [500] 82 [500] 83 [500] 85 [333.008] 86 [389.16] 87 [277.832] 88 [500] 89 [500] 92 [500]] +/Type /Font +>> +endobj xref +0 8 +0000000000 65535 f +0000000015 00000 n +0000000074 00000 n +0000000254 00000 n +0000000383 00000 n +0000000203 00000 n +0000000680 00000 n +0000000499 00000 n +trailer + +<< +/Root 5 0 R +/Size 8 +>> +startxref +1134 +%%EOF diff --git a/test/test_manifest.json b/test/test_manifest.json index 2674f4d70..acd3d3f15 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -3030,6 +3030,13 @@ "lastPage": 1, "type": "eq" }, + { "id": "issue11578", + "file": "pdfs/issue11578_reduced.pdf", + "md5": "6cefb4bdfae2fa25e5585374735e321f", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "issue4890", "file": "pdfs/issue4890.pdf", "md5": "1666feb4cd26318c2bdbea6a175dce87",