1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Add a heuristic to scale even single-char text, when the horizontal/vertical scaling differs significantly (issue 11713)

At this point in time, compared to when the "ignore single-char" code was added, we *should* generally be doing a much better job of combining text into as few chunks as possible.
However, there's still bad cases where we're not able to combine text as much as one would like, which is why I'm *not* proposing to simply measure/scale all text. Instead this patch will to only measure/scale single-char text in cases where the horizontal/vertical scale is off significantly, since that's were you'd expect bad text-selection behaviour otherwise.

Note that most of the movement caused by this patch is with Type3 fonts, which is a somewhat special font type and one where our current text-selection behaviour is probably the least good.
This commit is contained in:
Jonas Jenwald 2020-03-22 14:09:08 +01:00
parent 70c54ab9d9
commit 91efde5246
4 changed files with 22 additions and 0 deletions

View file

@ -143,6 +143,7 @@
!issue6621.pdf
!issue6286.pdf
!issue1055r.pdf
!issue11713.pdf
!issue1293r.pdf
!issue1655r.pdf
!issue6541.pdf

BIN
test/pdfs/issue11713.pdf Normal file

Binary file not shown.

View file

@ -1107,6 +1107,12 @@
"link": false,
"type": "text"
},
{ "id": "issue11713",
"file": "pdfs/issue11713.pdf",
"md5": "bafe5801234feeb95969da106f2ce6d8",
"rounds": 1,
"type": "text"
},
{ "id": "bug1250079",
"file": "pdfs/bug1250079.pdf",
"md5": "a1dd21a70ae7097d96273e85a80b26ef",