mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Merge pull request #15517 from Snuffleupagus/issue-15516
Add more non-standard ligatures in the `glyphlist.js` file (issue 15516)
This commit is contained in:
commit
7b24931f67
4 changed files with 23 additions and 1 deletions
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -108,6 +108,7 @@
|
|||
!issue10542_reduced.pdf
|
||||
!issue10665_reduced.pdf
|
||||
!issue11016_reduced.pdf
|
||||
!issue15516_reduced.pdf
|
||||
!issue11045.pdf
|
||||
!bug1057544.pdf
|
||||
!issue11150_reduced.pdf
|
||||
|
|
BIN
test/pdfs/issue15516_reduced.pdf
Normal file
BIN
test/pdfs/issue15516_reduced.pdf
Normal file
Binary file not shown.
|
@ -2417,6 +2417,23 @@ Caron Broadcasting, Inc., an Ohio corporation (“Lessee”).`)
|
|||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
// TODO: Change this to a `text` reference test instead.
|
||||
// Currently that doesn't work, since the `XMLSerializer` fails on
|
||||
// the ASCII "control characters" found in the text-content.
|
||||
it("gets text content with non-standard ligatures (issue issue15516)", async function () {
|
||||
const loadingTask = getDocument(
|
||||
buildGetDocumentParams("issue15516_reduced.pdf")
|
||||
);
|
||||
const pdfDoc = await loadingTask.promise;
|
||||
const pdfPage = await pdfDoc.getPage(1);
|
||||
const { items } = await pdfPage.getTextContent();
|
||||
const text = mergeText(items);
|
||||
|
||||
expect(text).toEqual("ffi fi ffl ff fl \x07 \x08 Ý");
|
||||
|
||||
await loadingTask.destroy();
|
||||
});
|
||||
|
||||
it("gets empty structure tree", async function () {
|
||||
const tree = await page.getStructTree();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue