Skip to content

Conversation

@Aditi-1400
Copy link
Contributor

This fixes #20426 which was caused as a regression of #20197.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1998618#c2:

The pdf contains a font with some characters outside of the range [0x0000-0xFFFF] and when writing the cmap we use the format 4 which is supposed to only handle characters in this range !
For this specific font, a format 8 would have been better:
https://learn.microsoft.com/en-us/typography/opentype/spec/cmap#format-8-mixed-16-bit-and-32-bit-coverage

For now, this makes the properties disableFontFace and bbox mutable as they are later reassgined in https://github.com/mozilla/pdf.js/blob/master/src/core/evaluator.js#L4742 while falling back to browser fonts and in https://github.com/mozilla/pdf.js/blob/master/src/core/evaluator.js#L4830.

@calixteman
Copy link
Contributor

@Aditi-1400 here's a test file:
t1.pdf

@Aditi-1400
Copy link
Contributor Author

Aditi-1400 commented Nov 13, 2025

@Aditi-1400 here's a test file: t1.pdf

@calixteman This one's also pretty close to ~10MB 😅

@calixteman
Copy link
Contributor

@Aditi-1400 here's a test file: t1.pdf

@calixteman This one's also pretty close to ~10MB 😅

Oh, sorry I obviously didn't check the size.
Anyway, please make a linked test (i.e. create a file issue20426.pdf.link, copy and paste the link from the gh issue in the file and then add the md5 and then "link": true in test_manifest.json.

@Aditi-1400 Aditi-1400 force-pushed the issue-20426 branch 3 times, most recently from e76fa29 to dcfaea0 Compare November 18, 2025 11:32
@calixteman
Copy link
Contributor

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/7259cb55e9be09e/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/0dc2e410e311318/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/7259cb55e9be09e/output.txt

Total script time: 39.77 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 1

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/0dc2e410e311318/output.txt

Total script time: 76.18 mins

  • Unit tests: FAILED
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 1

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

@calixteman
Copy link
Contributor

/botio-linux test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 39.48 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 1

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

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@calixteman calixteman merged commit ddf3a98 into mozilla:master Nov 20, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Failed to load font 'g_d0_f1': 'SyntaxError: Invalid font data in ArrayBuffer.'

5 participants