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

Always use standard font data, with disableFontFace set in the API (PR 12726 follow-up) #13516

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jun 8, 2021

We must force-fetch standard font data, when disableFontFace = true is set in the API, since otherwise rendering in e.g. the viewer is still broken (same as before PR #12726 landed).

Please note: We still need to also load standard font data for patterns and/or some text-rendering modes, however that will require larger changes so I figured that it cannot hurt to submit this patch right now.


Currently I'm also looking into the follow-up of how to try and support the patterns and/or text-rendering modes use-cases, which is quite important to fix a number of bugs, but it unfortunately looks quite messy :-(

It seems that we'd need to somehow invalidate and then re-parse fonts in these cases, however my initial experiments have lead to very ugly code that isn't really maintainable.

Basically, all of this would be a lot easier if we could just always load the standard font files instead. Obviously the Foxit fonts are a bit limited, but if we replaced them with Liberation fonts instead that might work (despite those files being a bit larger)?

There's also the question of Linux in particular, since there's a number of bugs/issues about the system fonts leading to poor rendering there. Hence it seems to me that we'd maybe even want to unconditionally load the standard font files there?

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jun 8, 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/ca30329a96cb2a8/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 8, 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/5c67768d7445306/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 8, 2021

From: Bot.io (Linux m4)


Failed

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

Total script time: 26.07 mins

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

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

@pdfjsbot
Copy link

pdfjsbot commented Jun 8, 2021

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/5c67768d7445306/output.txt

Total script time: 29.87 mins

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

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

@Snuffleupagus Snuffleupagus force-pushed the standard-fonts-disableFontFace branch 2 times, most recently from f12a3cb to 0f89083 Compare June 9, 2021 16:24
…(PR 12726 follow-up)

We must force-fetch standard font data, when `disableFontFace = true` is set in the API, since otherwise rendering in e.g. the viewer is still broken (same as before PR 12726 landed).

*Please note:* We still need to also load standard font data for patterns and/or some text-rendering modes, however that will require larger changes so I figured that it cannot hurt to submit *this* patch right now.
@Snuffleupagus Snuffleupagus force-pushed the standard-fonts-disableFontFace branch from 0f89083 to 69477bf Compare June 9, 2021 19:21
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 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/f8ef0c8368b6377/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 9, 2021

From: Bot.io (Linux m4)


Success

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

Total script time: 4.55 mins

Published

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

Looks good!

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.

3 participants