-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Add upper-case I
as a possible space replacement fallback in Font.spaceWidth
to improve text-selection (issue 7180)
#7390
Conversation
…spaceWidth` to improve text-selection (issue 7180) In fonts with only upper-case glyphs, that are also missing a space glyph, `get spaceWidth` won't be able to return anything useful. By adding upper-case `I` as a fallback, we can thus improve text-selection in some PDF files. Note that locally, the patch causes slight movement in a few existing `text` tests, but in my opinion this actually looks like slight improvements. Fixes 7180.
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/4cdab74f6238304/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/119de8c1e4ac4bd/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/4cdab74f6238304/output.txt Total script time: 21.11 mins
Image differences available at: http://107.22.172.223:8877/4cdab74f6238304/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)FailedFull output at http://107.21.233.14:8877/119de8c1e4ac4bd/output.txt Total script time: 27.57 mins
Image differences available at: http://107.21.233.14:8877/119de8c1e4ac4bd/reftest-analyzer.html#web=eq.log |
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.22.172.223:8877/8042998041752eb/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://107.21.233.14:8877/7d26cc5960f3765/output.txt |
@Snuffleupagus Another thought for a different PR: maybe instead of relying on 'i' or 'I' we should just take the first non-zero width if all the others fail? |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/8042998041752eb/output.txt Total script time: 22.48 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/7d26cc5960f3765/output.txt Total script time: 26.99 mins
|
In fonts with only upper-case glyphs, that are also missing a space glyph,
get spaceWidth
won't be able to return anything useful.By adding upper-case
I
as a fallback, we can thus improve text-selection in some PDF files.Note that locally, the patch causes slight movement in a few existing
text
tests, but in my opinion this actually looks like slight improvements.Fixes #7180.