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

[api-minor] Re-factor the disableFontFace fallback value, and skip initializing factories with useWorkerFetch set #13525

Merged
merged 2 commits into from
Jun 9, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jun 9, 2021

  • [api-minor] Set the disableFontFace fallback value directly in the API

    At this point in time, the apiCompatibilityParams is essentially unused with the sole exception of the disableFontFace handling for Node.js environments.
    Given that isNodeJS is a constant now (originally it was a function), we can simply set the correct fallback value for disableFontFace directly in the API and clean-up the code a bit here.

  • Don't initialize CMapReaderFactory/StandardFontDataFactory when the useWorkerFetch API option is set

    Given that there's no fallback on the worker-thread, it shouldn't be necessary to initialize CMapReaderFactory/StandardFontDataFactory when useWorkerFetch = true is set.

    Slightly unrelated, but this patch also ensures that the useSystemFonts default value only does the isNodeJS check in builds where that's actually necessary.

At this point in time, the `apiCompatibilityParams` is essentially unused with the sole exception of the `disableFontFace` handling for Node.js environments.
Given that `isNodeJS` is a constant now (originally it was a function), we can simply set the correct fallback value for `disableFontFace` directly in the API and clean-up the code a bit here.
…he `useWorkerFetch` API option is set

Given that there's no fallback on the worker-thread, it shouldn't be necessary to initialize `CMapReaderFactory`/`StandardFontDataFactory` when `useWorkerFetch = true` is set.

Slightly unrelated, but this patch also ensures that the `useSystemFonts` default value only does the `isNodeJS` check in builds where that's actually necessary.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/5460c3e33cd1556/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 2021

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/5460c3e33cd1556/output.txt

Total script time: 25.90 mins

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

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

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 2021

From: Bot.io (Windows)


Failed

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

Total script time: 29.67 mins

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

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

@timvandermeij timvandermeij merged commit 2a65455 into mozilla:master Jun 9, 2021
@timvandermeij
Copy link
Contributor

Thank you for cleaning this up!

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.

3 participants