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 with empty /FontBBox-entries (issue 6605) #13461

Merged
merged 2 commits into from
Jun 6, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

For Type3 fonts where the /CharProcs-streams of the individual glyphs start with a d1 operator, we can use that to build a fallback bounding box for the font and thus improve text-selection in some cases.

Fixes #6605

@Snuffleupagus Snuffleupagus force-pushed the issue-6605 branch 3 times, most recently from 327cba6 to 678c338 Compare June 2, 2021 20:36
@mozilla mozilla deleted a comment from pdfjsbot Jun 3, 2021
@mozilla mozilla deleted a comment from pdfjsbot Jun 3, 2021
@mozilla mozilla deleted a comment from pdfjsbot Jun 3, 2021
@mozilla mozilla deleted a comment from pdfjsbot Jun 3, 2021
@pdfjsbot
Copy link

pdfjsbot commented Jun 3, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9ac839ee3728870/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 3, 2021

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/3054c03a9599f1f/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 3, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/9ac839ee3728870/output.txt

Total script time: 25.71 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://54.67.70.0:8877/9ac839ee3728870/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Jun 3, 2021

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/3054c03a9599f1f/output.txt

Total script time: 29.08 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED

Image differences available at: http://3.101.106.178:8877/3054c03a9599f1f/reftest-analyzer.html#web=eq.log

…issue 6605)

For Type3 fonts where the /CharProcs-streams of the individual glyph starts with a `d1` operator, we can use that to build a fallback bounding box for the font and thus improve text-selection in some cases.
…tent`

This is necessary now, since with the previous patch the /FontBBox potentially depends on the contents of the /CharProcs-streams.
Note that if `getOperatorList` is called *before* `getTextContent`, this patch doesn't matter since the font is already fully loaded/parsed. However, for e.g. the `text` test-cases this is necessary to ensure correct reference images.
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/6c8948f10081340/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/6c8948f10081340/output.txt

Total script time: 3.80 mins

Published

@timvandermeij timvandermeij merged commit 2b63d97 into mozilla:master Jun 6, 2021
@timvandermeij
Copy link
Contributor

Looks good; thank you for fixing this!

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/091d9cedfdc1d9e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Windows)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 1

Live output at: http://3.101.106.178:8877/03d311731119887/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/091d9cedfdc1d9e/output.txt

Total script time: 22.50 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

pdfjsbot commented Jun 6, 2021

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/03d311731119887/output.txt

Total script time: 25.96 mins

  • Lint: Passed
  • 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.

very high marking of type 3 font glyphs with 0 0 0 0 BBox
3 participants