From 2dca14028d7f1a8be0b998d15b157bc9e43b69db Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 13 Jun 2022 09:48:40 +0200 Subject: [PATCH] Extend `getGlyphMapForStandardFonts` with some Hebrew entries (issue 15033) This only adds the minimum entries required in order to render the referenced document correctly, rather than trying to support "all" Hebrew glyphs, to ensure that all lines in `getGlyphMapForStandardFonts` are covered by tests. --- src/core/standard_fonts.js | 27 +++++++++++++++++++++++++++ test/pdfs/issue15033.pdf.link | 1 + test/test_manifest.json | 8 ++++++++ 3 files changed, 36 insertions(+) create mode 100644 test/pdfs/issue15033.pdf.link diff --git a/src/core/standard_fonts.js b/src/core/standard_fonts.js index da4aac68a..766b052a8 100644 --- a/src/core/standard_fonts.js +++ b/src/core/standard_fonts.js @@ -524,6 +524,33 @@ const getGlyphMapForStandardFonts = getLookupTableFactory(function (t) { t[337] = 9552; t[493] = 1039; t[494] = 1040; + t[672] = 1488; + t[673] = 1489; + t[674] = 1490; + t[675] = 1491; + t[676] = 1492; + t[677] = 1493; + t[678] = 1494; + t[679] = 1495; + t[680] = 1496; + t[681] = 1497; + t[682] = 1498; + t[683] = 1499; + t[684] = 1500; + t[685] = 1501; + t[686] = 1502; + t[687] = 1503; + t[688] = 1504; + t[689] = 1505; + t[690] = 1506; + t[691] = 1507; + t[692] = 1508; + t[693] = 1509; + t[694] = 1510; + t[695] = 1511; + t[696] = 1512; + t[697] = 1513; + t[698] = 1514; t[705] = 1524; t[706] = 8362; t[710] = 64288; diff --git a/test/pdfs/issue15033.pdf.link b/test/pdfs/issue15033.pdf.link new file mode 100644 index 000000000..f9c2fef97 --- /dev/null +++ b/test/pdfs/issue15033.pdf.link @@ -0,0 +1 @@ +https://github.com/mozilla/pdf.js/files/8888402/4454c98b88d37d5dad779b60a3f35e6e.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index 39875d3a4..abeee8cdd 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -4958,6 +4958,14 @@ "type": "eq", "annotations": true }, + { "id": "issue15033", + "file": "pdfs/issue15033.pdf", + "md5": "4454c98b88d37d5dad779b60a3f35e6e", + "rounds": 1, + "link": true, + "lastPage": 1, + "type": "eq" + }, { "id": "gesamt", "file": "pdfs/gesamt.pdf", "md5": "743aaa6f46ed0a42864f079d632d942e",