Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard glyph mapping for non-embedded and non-composite Calibri fonts (issue 18208) #18628

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

Snuffleupagus
Copy link
Collaborator

Given that we handle non-embedded Calibri fonts as "mapped to standard font", we really ought to be able to use the same glyph mapping as for an actual standard font.
Note that this actually improves consistency in the code, given how we already handle such fonts if they happen to be of the CIDFontType2 type; see

pdf.js/src/core/fonts.js

Lines 1186 to 1190 in b47c7ec

if (
(isStandardFont || isMappedToStandardFont) &&
type === "CIDFontType2" &&
this.cidEncoding.startsWith("Identity-")
) {


Please note: I'm well aware that someone else expressed interest in working on this issue, however that was over a month ago and there's not been any updates since. Hence it's hopefully OK to "steal" the issue now.
Also, given just how complicated the topic of fonts in PDFs usually are that issue was probably never going to be a good beginner bug unfortunately.

… fonts (issue 18208)

Given that we handle non-embedded Calibri fonts as "mapped to standard font", we really ought to be able to use the same glyph mapping as for an actual standard font.
Note that this actually improves consistency in the code, given how we already handle such fonts if they happen to be of the `CIDFontType2` type; see https://github.com/mozilla/pdf.js/blob/b47c7eca83c35b8f9ea170aa3742fc70359726c2/src/core/fonts.js#L1186-L1190
@Snuffleupagus Snuffleupagus linked an issue Aug 19, 2024 that may be closed by this pull request
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/45a0654f13ab497/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Failed

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

Total script time: 30.47 mins

  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 27
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/d3c9cf08ddf5e41/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/45a0654f13ab497/output.txt

Total script time: 47.63 mins

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

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

@timvandermeij
Copy link
Contributor

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 1.05 mins

Published

@timvandermeij timvandermeij merged commit e0fc1a3 into mozilla:master Aug 19, 2024
8 checks passed
@timvandermeij
Copy link
Contributor

Thank you for fixing this!

/botio makeref

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/8a8156088a6bec5/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/68799cc97862c4d/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/8a8156088a6bec5/output.txt

Total script time: 20.63 mins

  • Make references: Passed
  • Check references: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/68799cc97862c4d/output.txt

Total script time: 26.31 mins

  • Make references: Passed
  • Check references: Passed

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.

Special character € does not appear
3 participants