From 3c046c0a21bd4a7e5bf5a7b94c5bcce3314c9583 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 19 Oct 2022 17:49:40 +0200 Subject: [PATCH] Extend `getSupplementalGlyphMapForCalibri` with some umlauts (issue 15594) --- src/core/standard_fonts.js | 6 ++ test/pdfs/.gitignore | 1 + test/pdfs/issue15594_reduced.pdf | 97 ++++++++++++++++++++++++++++++++ test/test_manifest.json | 6 ++ 4 files changed, 110 insertions(+) create mode 100644 test/pdfs/issue15594_reduced.pdf diff --git a/src/core/standard_fonts.js b/src/core/standard_fonts.js index 294509f0c..cd2b93228 100644 --- a/src/core/standard_fonts.js +++ b/src/core/standard_fonts.js @@ -765,6 +765,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[4] = 65; t[5] = 192; t[6] = 193; + t[9] = 196; t[17] = 66; t[18] = 67; t[21] = 268; @@ -786,6 +787,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[69] = 78; t[75] = 79; t[76] = 210; + t[80] = 214; t[87] = 80; t[89] = 81; t[90] = 82; @@ -794,6 +796,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[97] = 352; t[100] = 84; t[104] = 85; + t[109] = 220; t[115] = 86; t[116] = 87; t[121] = 88; @@ -804,6 +807,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[258] = 97; t[259] = 224; t[260] = 225; + t[263] = 228; t[268] = 261; t[271] = 98; t[272] = 99; @@ -830,6 +834,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[381] = 111; t[382] = 242; t[383] = 243; + t[386] = 246; t[393] = 112; t[395] = 113; t[396] = 114; @@ -839,6 +844,7 @@ const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { t[403] = 353; t[410] = 116; t[437] = 117; + t[442] = 252; t[448] = 118; t[449] = 119; t[454] = 120; diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 9d25fd4f7..055b2607d 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -350,6 +350,7 @@ !issue9534_reduced.pdf !attachment.pdf !basicapi.pdf +!issue15594_reduced.pdf !issue2884_reduced.pdf !mixedfonts.pdf !shading_extend.pdf diff --git a/test/pdfs/issue15594_reduced.pdf b/test/pdfs/issue15594_reduced.pdf new file mode 100644 index 000000000..d3827461c --- /dev/null +++ b/test/pdfs/issue15594_reduced.pdf @@ -0,0 +1,97 @@ +%PDF-1.7 +%âãÏÓ +1 0 obj +<< +/FontName /Calibri +/StemV 0 +/Ascent 750 +/Flags 32 +/Descent -250 +/ItalicAngle 0 +/FontBBox [-503 -312 1240 1026] +/Type /FontDescriptor +/CapHeight 0 +>> +endobj +2 0 obj +<< +/BaseFont /Calibri +/CIDSystemInfo +<< +/Supplement 0 +/Ordering (Identity) +/Registry (Adobe) +>> +/Subtype /CIDFontType2 +/FontDescriptor 1 0 R +/Type /Font +>> +endobj +3 0 obj +<< +/Pages 4 0 R +/Type /Catalog +>> +endobj +4 0 obj +<< +/Kids [5 0 R] +/Type /Pages +/Count 1 +>> +endobj +5 0 obj +<< +/Parent 4 0 R +/Resources +<< +/Font +<< +/F1 6 0 R +>> +>> +/MediaBox [0 0 200 50] +/Type /Page +/Contents 7 0 R +>> +endobj +6 0 obj +<< +/BaseFont /Calibri +/DescendantFonts [2 0 R] +/Subtype /Type0 +/Encoding /Identity-H +/Type /Font +>> +endobj +7 0 obj +<< +/Length 55 +>> +stream +BT +10 20 TD +/F1 20 Tf +<00090050006D0107018201BA> Tj +ET + +endstream +endobj xref +0 8 +0000000000 65535 f +0000000015 00000 n +0000000184 00000 n +0000000358 00000 n +0000000409 00000 n +0000000468 00000 n +0000000597 00000 n +0000000714 00000 n +trailer + +<< +/Root 3 0 R +/Size 8 +>> +startxref +821 +%%EOF diff --git a/test/test_manifest.json b/test/test_manifest.json index ae251db11..bad62f408 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -603,6 +603,12 @@ "lastPage": 4, "type": "text" }, + { "id": "issue15594", + "file": "pdfs/issue15594_reduced.pdf", + "md5": "6820808944a2a84c72d00a0e1476227b", + "rounds": 1, + "type": "eq" + }, { "id": "rotated-text", "file": "pdfs/rotated.pdf", "md5": "aed187f53e969ccdcbab0bb4c59f9e46",