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

Add a parser to get font data from the default appearance #12831

Merged
merged 2 commits into from
Jan 21, 2021

Conversation

calixteman
Copy link
Contributor

  • pdfium & poppler use a special parser too to get these info.

@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jan 7, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/1a31ade6640d55a/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 7, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/1a31ade6640d55a/output.txt

Total script time: 26.26 mins

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

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

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

There appears to be one regression, in the issue12750 test-case.
Furthermore, I'd strongly recomment making the overall parsing a lot more robust by utilizing the Parser/Lexer instead; please see inline comments.

src/core/annotation.js Outdated Show resolved Hide resolved
src/core/annotation.js Outdated Show resolved Hide resolved
src/core/annotation.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/defaultappearance.js Outdated Show resolved Hide resolved
src/core/annotation.js Show resolved Hide resolved
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

This looks much nicer already, however I've got few more suggestions here.

src/core/default_appearance.js Outdated Show resolved Hide resolved
src/core/default_appearance.js Show resolved Hide resolved
src/core/default_appearance.js Outdated Show resolved Hide resolved
src/core/default_appearance.js Outdated Show resolved Hide resolved
test/unit/jasmine-boot.js Show resolved Hide resolved
 - pdfium & poppler use a special parser too to get these info.
@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/f49257d723713cf/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/f49257d723713cf/output.txt

Total script time: 26.40 mins

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

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

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

We should probably get the Windows-bot restarted, such that we can actually run all tests before landing this.

This looks good to me, with the final comment addressed and all test run.

src/core/default_appearance.js Outdated Show resolved Hide resolved
Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>
@calixteman
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/3bc73e64f91cb4c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/bd7ae5fcdf7d32e/output.txt

@calixteman
Copy link
Contributor Author

We should probably get the Windows-bot restarted, such that we can actually run all tests before landing this.

I restarted it (error was: shell.js: internal error Error: EPERM: operation not permitted, unlink 'C:\pdfjs\botio-files-pdfjs\private\165fb7f6ccb2470/node_modules/puppeteer/.local-firefox/win64-86.0a1/firefox/browser/omni.ja')

This looks good to me, with the final comment addressed and all test run.

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/3bc73e64f91cb4c/output.txt

Total script time: 26.49 mins

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/bd7ae5fcdf7d32e/output.txt

Total script time: 27.32 mins

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

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

@calixteman
Copy link
Contributor Author

The integration test failure is unrelated to this patch (maybe because I opened a remote desktop to restart the bot).

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

r=me, with the commits squashed :-)

@calixteman calixteman merged commit 1039698 into mozilla:master Jan 21, 2021
phuocng pushed a commit to react-pdf-viewer/pdf.js that referenced this pull request May 2, 2021
)

* Add a parser to get font data from the default appearance
 - pdfium & poppler use a special parser too to get these info.

* Update src/core/default_appearance.js

Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>

Co-authored-by: Jonas Jenwald <jonas.jenwald@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants