mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 10:15:37 +02:00
Merge pull request #7390 from Snuffleupagus/issue-7180
Add upper-case `I` as a possible space replacement fallback in `Font.spaceWidth` to improve text-selection (issue 7180)
This commit is contained in:
commit
e2e657e44f
4 changed files with 9 additions and 1 deletions
|
@ -2650,7 +2650,7 @@ var Font = (function FontClosure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// trying to estimate space character width
|
// trying to estimate space character width
|
||||||
var possibleSpaceReplacements = ['space', 'minus', 'one', 'i'];
|
var possibleSpaceReplacements = ['space', 'minus', 'one', 'i', 'I'];
|
||||||
var width;
|
var width;
|
||||||
for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
|
for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) {
|
||||||
var glyphName = possibleSpaceReplacements[i];
|
var glyphName = possibleSpaceReplacements[i];
|
||||||
|
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
|
@ -24,6 +24,7 @@
|
||||||
!issue7020.pdf
|
!issue7020.pdf
|
||||||
!issue7101.pdf
|
!issue7101.pdf
|
||||||
!issue7115.pdf
|
!issue7115.pdf
|
||||||
|
!issue7180.pdf
|
||||||
!issue7200.pdf
|
!issue7200.pdf
|
||||||
!issue7229.pdf
|
!issue7229.pdf
|
||||||
!filled-background.pdf
|
!filled-background.pdf
|
||||||
|
|
BIN
test/pdfs/issue7180.pdf
Normal file
BIN
test/pdfs/issue7180.pdf
Normal file
Binary file not shown.
|
@ -1555,6 +1555,13 @@
|
||||||
"link": false,
|
"link": false,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "issue7180-text",
|
||||||
|
"file": "pdfs/issue7180.pdf",
|
||||||
|
"md5": "73ed92d7ca55475f1f31d1d75fee3283",
|
||||||
|
"rounds": 1,
|
||||||
|
"link": false,
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "bug1123803",
|
"id": "bug1123803",
|
||||||
"file": "pdfs/bug1123803.pdf",
|
"file": "pdfs/bug1123803.pdf",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue