Skip to content

Remove readUint32 usage from the isTrueTypeFile function#21078

Merged
Snuffleupagus merged 2 commits intomozilla:masterfrom
Snuffleupagus:isTrueTypeFile-rm-readUint32
Apr 12, 2026
Merged

Remove readUint32 usage from the isTrueTypeFile function#21078
Snuffleupagus merged 2 commits intomozilla:masterfrom
Snuffleupagus:isTrueTypeFile-rm-readUint32

Conversation

@Snuffleupagus
Copy link
Copy Markdown
Collaborator

This is the only readUint32 usage in the src/core/fonts.js file, and it can be trivially replaced with a string comparison.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.31%. Comparing base (169d8c9) to head (2e5ab9c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21078      +/-   ##
==========================================
- Coverage   63.34%   63.31%   -0.04%     
==========================================
  Files         177      177              
  Lines      124747   124719      -28     
==========================================
- Hits        79023    78965      -58     
- Misses      45724    45754      +30     
Flag Coverage Δ
fonttest 7.64% <100.00%> (+<0.01%) ⬆️
unittestcli 63.28% <100.00%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Snuffleupagus Snuffleupagus marked this pull request as draft April 10, 2026 15:30
Copy link
Copy Markdown
Contributor

@timvandermeij timvandermeij left a comment

Choose a reason for hiding this comment

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

Looks good to me, with passing tests. Thanks!

This is the only `readUint32` usage in the `src/core/fonts.js` file, and it can be trivially replaced with a string comparison.
After recent patches, that added more `DataView` usage, these helper functions are now unused.
@Snuffleupagus Snuffleupagus force-pushed the isTrueTypeFile-rm-readUint32 branch from 2e8a07a to 2e5ab9c Compare April 12, 2026 17:53
@Snuffleupagus Snuffleupagus marked this pull request as ready for review April 12, 2026 17:53
@Snuffleupagus
Copy link
Copy Markdown
Collaborator Author

/botio unittest

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_unittest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/b10f114ff3688dd/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/18a71389341762f/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/b10f114ff3688dd/output.txt

Total script time: 2.84 mins

  • Unit Tests: Passed

@Snuffleupagus
Copy link
Copy Markdown
Collaborator Author

/botio-linux browsertest

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/0d5a9fdda34c35f/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/18a71389341762f/output.txt

Total script time: 6.86 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/0d5a9fdda34c35f/output.txt

Total script time: 18.36 mins

  • Regression tests: Passed

@Snuffleupagus Snuffleupagus merged commit 652700d into mozilla:master Apr 12, 2026
13 checks passed
@Snuffleupagus Snuffleupagus deleted the isTrueTypeFile-rm-readUint32 branch April 12, 2026 19:34
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.

4 participants