Repository navigation
[api-major] Generate the non-embedded fonts with Hellbox, at the PDF widths - #22419
calixteman wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22419 +/- ##
==========================================
- Coverage 90.58% 90.50% -0.08%
==========================================
Files 279 282 +3
Lines 68598 68637 +39
==========================================
- Hits 62140 62121 -19
- Misses 6458 6516 +58
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Viewer previewCommit 33bc56d (build logs).
Previews are removed when the PR closes and may be pruned after 30 days without an update. |
Merging this PR will improve performance by 13.57%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes
|
|
Tagging this |
I'm guessing that's mostly because of the |
|
Could the first two commits perhaps be moved to its own PR, to make this one a little bit smaller? |
No we don't have such stats and they'd be very likely meaningless because people disabling wasm (for fingerprinting reasons) very likely disabled telemetry too. I'll try see if we can have at least an upper bound. |
Reference testsResults for 33bc56d (run, references from mozilla/pdf.js.refs@d16403bcaa).
The report is kept for 30 days and replaced by the next run. |
|
Given that Firefox will download some data on demand (e.g. AI models), would it perhaps be feasible to not bundle the |
That's a good idea for sure (we could use to download Chinese fallback fonts for example) but I'm pretty sure that people who disable wasm, disable AI too and very likely disable remote settings. |
|
Glancing at the browsertest results, there's obviously a lot of movement (which is expected), however there's also e.g. |
Snuffleupagus
left a comment
There was a problem hiding this comment.
One thing I like about this patch is that it reduces the number of XFA special-cases in the evaluator/font code.
It is how the glyph is now: |
Replace bundled font programs with glyph data. Generate replacement fonts with PDF widths and substitutes for missing XFA fonts. Use a JavaScript fallback when WASM is disabled or fails to load.
|
I reduced the size of the fallback in using |
Snuffleupagus
left a comment
There was a problem hiding this comment.
Given the size/scope of this, I think that we can probably just land this now to get it into Firefox Nightly as soon as possible since that should help with real-world testing.
Any problems can then be dealt with in follow-up patches.
r=me, thanks.
This replaces the bundled Foxit Type1 and Liberation Sans files with Hellbox glyph data (Arimo, Tinos, Liberation Mono, Noto symbols) and a small generator (Rust to Wasm, with a JS fallback when Wasm isn't available).
It has few advantages:
It has few inconvenients: