Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend getGlyphMapForStandardFonts with some Hebrew entries (issue 15033) #15034

Merged
merged 1 commit into from
Jun 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/core/standard_fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,33 @@ const getGlyphMapForStandardFonts = getLookupTableFactory(function (t) {
t[337] = 9552;
t[493] = 1039;
t[494] = 1040;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this patch, but could we fill the gaps ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned above, I'm not all that keen on adding a bunch of entries here without real-world test-cases that benefit from the changes.
Also, I believe that the list was (originally) purposely made sparse to keep its size down such that we don't unnecessarily bloat the file size here.

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;
Expand Down
1 change: 1 addition & 0 deletions test/pdfs/issue15033.pdf.link
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/8888402/4454c98b88d37d5dad779b60a3f35e6e.pdf
8 changes: 8 additions & 0 deletions test/test_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down