Stop exporting the Font mimetype property - #22038
Merged
Merged
Conversation
Contributor
Reference testsResults for 05566bd (run, references from mozilla/pdf.js.refs@fd080e6597).
The report is kept for 30 days and replaced by the next run. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #22038 +/- ##
==========================================
+ Coverage 90.35% 90.36% +0.01%
==========================================
Files 269 269
Lines 67208 67204 -4
==========================================
+ Hits 60723 60732 +9
+ Misses 6485 6472 -13
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:
|
sync-pdfs-for-pdf-js Bot
pushed a commit
to mozilla/pdf.js.refs
that referenced
this pull request
Sep 30, 2026
Snuffleupagus
force-pushed
the
rm-mimetype-export
branch
from
September 30, 2026 17:49
bb73c2d to
d04344c
Compare
sync-pdfs-for-pdf-js Bot
pushed a commit
to mozilla/pdf.js.refs
that referenced
this pull request
Sep 30, 2026
- All embedded font data, regardless of how it's specified in the PDF, is always converted into OpenType in the worker-thread. This has been the case since "forever" in the PDF.js project, hence the value of `Font.prototype.mimetype` never varies (when actually set). - With the introduction of the CSS Font Loading API, in the font-loading code, the `mimetype` property is no longer used *by default* in the main-thread. - Given that `Font.prototype.mimetype` is either a string or `null`, the way that PR 20197 implemented the serialization/deserialization isn't actually correct since an explicit `null` value is being converted into a `"null"` string.
Snuffleupagus
force-pushed
the
rm-mimetype-export
branch
from
October 1, 2026 12:14
d04344c to
05566bd
Compare
sync-pdfs-for-pdf-js Bot
pushed a commit
to mozilla/pdf.js.refs
that referenced
this pull request
Oct 1, 2026
timvandermeij
approved these changes
Oct 2, 2026
Collaborator
|
Thank you for cleaning this up! |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All embedded font data, regardless of how it's specified in the PDF, is always converted into OpenType in the worker-thread. This has been the case since "forever" in the PDF.js project, hence the value of
Font.prototype.mimetypenever varies (when actually set).With the introduction of the CSS Font Loading API, in the font-loading code, the
mimetypeproperty is no longer used by default in the main-thread.Given that
Font.prototype.mimetypeis either a string ornull, the way that PR Serialize font data into an ArrayBuffer #20197 implemented the serialization/deserialization isn't actually correct since an explicitnullvalue is being converted into a"null"string.