Skip to content

Extend getNonStdFontMap for non-embedded versions of the ItcSymbol font (issue 11532) #13952

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

Merged
merged 1 commit into from
Sep 1, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

Despite its name, the fonts in ItcSymbol-family are "regular" fonts and not Symbol ones. However, given that the font name contains the word "Symbol" we ended up picking the wrong code-path in the Font.fallbackToSystemFont-method.

Please note: While this patch ensures that the text becomes readable, by falling back a standard font, the rendering will obviously not be perfect. However, that's the PDF generators "fault" since non-embedded fonts cannot be guaranteed to render correctly in all environments.

Fixes #11532

@Snuffleupagus
Copy link
Collaborator Author

I didn't really have time to create a reduced test-case right now, but figured that submitting the patch with a linked test-case was better than the issue remaining open even longer; sorry about that!

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/a568b368ec96f3f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/a568b368ec96f3f/output.txt

Total script time: 9.71 mins

Published

@Snuffleupagus Snuffleupagus changed the title Extend getNonStdFontMap for non-embedded version of the ItcSymbol font (issue 11532) Extend getNonStdFontMap for non-embedded versions of the ItcSymbol font (issue 11532) Aug 31, 2021
…font (issue 11532)

Despite its name, the fonts in ItcSymbol-family are "regular" fonts and not Symbol ones. However, given that the font name contains the word "Symbol" we ended up picking the wrong code-path in the `Font.fallbackToSystemFont`-method.

*Please note:* While this patch ensures that the text becomes readable, by falling back a standard font, the rendering will obviously not be perfect. However, that's the PDF generators "fault" since non-embedded fonts cannot be guaranteed to render correctly in all environments.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/1a416e8ca56c68b/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/ec7c74e477accd8/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/ec7c74e477accd8/output.txt

Total script time: 28.13 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  errors: 607
  different ref/snapshot: 7
  different first/second rendering: 1

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

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux browsertest

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/b7180be0d46ea16/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/1a416e8ca56c68b/output.txt

Total script time: 40.02 mins

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

Image differences available at: http://3.101.106.178:8877/1a416e8ca56c68b/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/b7180be0d46ea16/output.txt

Total script time: 30.38 mins

  • Regression tests: FAILED
  different ref/snapshot: 8
  different first/second rendering: 2

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

@timvandermeij
Copy link
Contributor

Not sure what's up with the Linux bot...

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/0c09162203ffcdc/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2021

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/0c09162203ffcdc/output.txt

Total script time: 9.79 mins

Published

@timvandermeij timvandermeij merged commit 19ce2de into mozilla:master Sep 1, 2021
@timvandermeij
Copy link
Contributor

Looks good! I did find the old rendering amusing though ;-)

@Snuffleupagus Snuffleupagus deleted the ItcSymbol branch September 3, 2021 08:58
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.

Incorrect font rendering
3 participants