Skip to content

Keep the first /Subrs and /CharStrings block#21315

Merged
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:issue18548
May 24, 2026
Merged

Keep the first /Subrs and /CharStrings block#21315
calixteman merged 1 commit into
mozilla:masterfrom
calixteman:issue18548

Conversation

@calixteman
Copy link
Copy Markdown
Contributor

Some Type1 fonts (the embedded Optima variants in orw1972.pdf) ship two /Subrs and /CharStrings blocks wrapped in save/restore frames gated on an Adobe hires/lores runtime switch.
In such cases, we just use the first /Subrs and /CharStrings block, which is the one that is actually used by the font renderer in Acrobat.

It fixes #18548.

@calixteman calixteman requested a review from timvandermeij May 21, 2026 20:19
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 21, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.42%. Comparing base (ea18e73) to head (1f8eed0).
⚠️ Report is 12 commits behind head on master.

Files with missing lines Patch % Lines
src/core/type1_parser.js 75.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #21315      +/-   ##
==========================================
+ Coverage   81.39%   81.42%   +0.02%     
==========================================
  Files         256      257       +1     
  Lines       65337    65327      -10     
==========================================
+ Hits        53183    53191       +8     
+ Misses      12154    12136      -18     
Flag Coverage Δ
fonttest 9.11% <0.00%> (-0.01%) ⬇️
integrationtest 67.00% <75.00%> (+0.02%) ⬆️
unittest 56.86% <75.00%> (+<0.01%) ⬆️
unittestcli 56.07% <75.00%> (+0.02%) ⬆️

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.

@calixteman
Copy link
Copy Markdown
Contributor Author

/botio browsertest

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/a5721ceccb6f98e/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/9f3ca7cba3932c5/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/9f3ca7cba3932c5/output.txt

Total script time: 7.37 mins

  • Regression tests: FAILED
  errors: 5

Image differences available at: http://54.241.84.105:8877/9f3ca7cba3932c5/reftest-analyzer.html#web=eq.log

@calixteman
Copy link
Copy Markdown
Contributor Author

/botio-linux browsertest

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/7aaa2baf24d6791/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/a5721ceccb6f98e/output.txt

Total script time: 25.61 mins

  • Regression tests: FAILED
  different ref/snapshot: 40

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

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/7aaa2baf24d6791/output.txt

Total script time: 18.56 mins

  • Regression tests: Passed

@calixteman
Copy link
Copy Markdown
Contributor Author

The "regressions" are improvements.

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.

r=me, with the comment and merge conflict addressed. Thank you for improving this!

Comment thread src/core/type1_parser.js Outdated
Some Type1 fonts (the embedded Optima variants in orw1972.pdf) ship
two /Subrs and /CharStrings blocks wrapped in save/restore frames
gated on an Adobe hires/lores runtime switch.
In such cases, we just use the first /Subrs and /CharStrings block,
which is the one that is actually used by the font renderer in Acrobat.

It fixes mozilla#18548.
@calixteman
Copy link
Copy Markdown
Contributor Author

/botio browsertest

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 2

Live output at: http://54.241.84.105:8877/915b20044daef5f/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_browsertest from @calixteman received. Current queue size: 2

Live output at: http://54.193.163.58:8877/8126f388761c373/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/915b20044daef5f/output.txt

Total script time: 18.56 mins

  • Regression tests: Passed

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/8126f388761c373/output.txt

Total script time: 25.16 mins

  • Regression tests: Passed

@calixteman calixteman merged commit 143a724 into mozilla:master May 24, 2026
22 checks passed
@calixteman
Copy link
Copy Markdown
Contributor Author

/botio makeref

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.193.163.58:8877/dd7fa2027adb22a/output.txt

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_makeref from @calixteman received. Current queue size: 0

Live output at: http://54.241.84.105:8877/18eabfa153108ce/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/18eabfa153108ce/output.txt

Total script time: 18.23 mins

  • Make references: Passed
  • Check references: Passed

@moz-tools-bot
Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/dd7fa2027adb22a/output.txt

Total script time: 25.12 mins

  • Make references: Passed
  • Check references: Passed

@calixteman calixteman deleted the issue18548 branch May 24, 2026 17:05
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.

[Bug]: "Invalid "Length1" property in Type1 font" in a PDF file generated in 2005

4 participants