1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 15:48:06 +02:00

Try to improve text-selection for Type3 fonts that utilize a non-default /FontMatrix (bug 1513120)

For Type3 fonts text-selection is often not that great, and there's a couple of heuristics used to try and improve things. This patch simple extends those heuristics a bit, and fixes a pre-existing "naive" array comparison, but this all feels a bit brittle to say the least.

The existing Type3 test-coverage isn't that great in general, and in particular Type3 `text` tests are few and far between, hence why this patch adds *two* different new `text` tests.
This commit is contained in:
Jonas Jenwald 2019-03-08 12:55:44 +01:00
parent d587abbceb
commit 88f9e633dd
5 changed files with 31 additions and 8 deletions

View file

@ -93,6 +93,7 @@
!bug1146106.pdf
!bug1245391_reduced.pdf
!bug1252420.pdf
!bug1513120_reduced.pdf
!issue9949.pdf
!bug1308536.pdf
!bug1337429.pdf

Binary file not shown.

View file

@ -1016,6 +1016,20 @@
"link": false,
"type": "eq"
},
{ "id": "bug1245391-text",
"file": "pdfs/bug1245391_reduced.pdf",
"md5": "6c946045ee0f2f663f269717c0f1614a",
"rounds": 1,
"link": false,
"type": "text"
},
{ "id": "bug1513120-text",
"file": "pdfs/bug1513120_reduced.pdf",
"md5": "e88ad8b5bb385296f475ca51ce0d216d",
"rounds": 1,
"link": false,
"type": "text"
},
{ "id": "bug1250079",
"file": "pdfs/bug1250079.pdf",
"md5": "a1dd21a70ae7097d96273e85a80b26ef",