Skip to content
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

Improve text-selection for Type3 fonts, using d0 operators, with empty /FontBBox-entries (issue 19624) #19625

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

Snuffleupagus
Copy link
Collaborator

For Type3 glyphs with d1 operators it's easy to compute a fallback bounding box, however for d0 the situation is more difficult.
Given that we nowadays compute the min/max of basic path-rendering operators on the worker-thread, we can utilize that by parsing these Type3 operatorLists to guess a more suitable fallback bounding box.

@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/92822c84d7f3aa9/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/a4e950d2bb59312/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/92822c84d7f3aa9/output.txt

Total script time: 2.44 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/a4e950d2bb59312/output.txt

Total script time: 8.13 mins

  • Unit Tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

/botio browsertest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/da6e25a2ab14186/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/e5783bf64f2c9c6/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/da6e25a2ab14186/output.txt

Total script time: 16.89 mins

  • Regression tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/e5783bf64f2c9c6/output.txt

Total script time: 29.65 mins

  • Regression tests: Passed

@Snuffleupagus
Copy link
Collaborator Author

@calixteman Gentle review ping?

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

…pty /FontBBox-entries (issue 19624)

For Type3 glyphs with `d1` operators it's easy to compute a fallback bounding box, however for `d0` the situation is more difficult.
Given that we nowadays compute the min/max of basic path-rendering operators on the worker-thread, we can utilize that by parsing these Type3 operatorLists to guess a more suitable fallback bounding box.
@Snuffleupagus Snuffleupagus merged commit 26b5c8f into mozilla:master Mar 10, 2025
9 checks passed
@Snuffleupagus
Copy link
Collaborator Author

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/9ad5e971503448f/output.txt

@calixteman
Copy link
Contributor

/botio-windows makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/f815c381bbaaff0/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/9ad5e971503448f/output.txt

Total script time: 16.89 mins

  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the issue-19624 branch March 10, 2025 15:46
@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/f815c381bbaaff0/output.txt

Total script time: 30.34 mins

  • Make references: Passed
  • Check references: Passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Some pdf texts are not shown and can not be selected when is shown by pdf.js
3 participants