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

[CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881) #5017

Merged
merged 3 commits into from
Jul 12, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1028735.
Fixes #4881.

Please note: The PDF file linked in the bug has been changed on the server, and the new file isn't affected by this issue, however I still think it makes sense to fix this since it's a regression.
Also, the test-case included here is obviously created from the previous (broken) version of the PDF file.

(Depends on PR #5014.)

Edit: Given that this PR basically reverts one aspect of CIDFontType2 font parsing to the state prior to PR #4259, I'm not sure if this patch is the ideal way to fix these regressions.
Even though this PR does fix two regressions, there is obviously a risk that it can regress other PDF files (where we currently don't have sufficient test coverage).

Cache a constant length and replace one usage of |in| with a comparison against undefined.
Replace a couple of |in| checks with comparisons against undefined.
@Snuffleupagus Snuffleupagus added this to the 2014 Q2 milestone Jun 28, 2014
@Snuffleupagus Snuffleupagus changed the title [CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735) [CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881) Jul 4, 2014
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jul 7, 2014

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/c054e11c342164e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jul 7, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/f608ad2cacf282a/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jul 7, 2014

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/c054e11c342164e/output.txt

Total script time: 0.10 mins

@pdfjsbot
Copy link

pdfjsbot commented Jul 7, 2014

From: Bot.io (Windows)


Failed

Full output at http://107.22.172.223:8877/f608ad2cacf282a/output.txt

Total script time: 0.97 mins

  • Font tests: FAILED
  • Unit tests: FAILED
  • Regression tests: FAILED

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

@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Jul 8, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/00b3dfbdf4dc3a0/output.txt

@yurydelendik
Copy link
Contributor

/botio-windows test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/a625dfa27744f2b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://107.22.172.223:8877/a625dfa27744f2b/output.txt

Total script time: 2.78 mins

  • Font tests: FAILED
  • Unit tests: Passed
  • Regression tests: FAILED

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

@yurydelendik
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/188c6e52948961a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/3286e05a916ee16/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/3286e05a916ee16/output.txt

Total script time: 21.42 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/188c6e52948961a/output.txt

Total script time: 36.44 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: FAILED

Image differences available at: http://107.21.233.14:8877/188c6e52948961a/reftest-analyzer.html#web=eq.log

@yurydelendik
Copy link
Contributor

/botio-linux makeref

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/8eab84f86d2c202/output.txt

yurydelendik added a commit that referenced this pull request Jul 12, 2014
[CIDFontType2] Map characters missing in toUnicode to the private use area (bug 1028735 and issue 4881)
@yurydelendik yurydelendik merged commit b5e5de0 into mozilla:master Jul 12, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch!

@yurydelendik
Copy link
Contributor

/botio-windows makeref

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @yurydelendik received. Current queue size: 1

Live output at: http://107.22.172.223:8877/2edfa6f4ead99aa/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/8eab84f86d2c202/output.txt

Total script time: 36.85 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the bug-1028735 branch July 12, 2014 14:08
@Snuffleupagus Snuffleupagus mentioned this pull request Jan 28, 2015
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.

PDF.js renders "Armed Resistance to Crime" title page with wrong font and weird kerning
3 participants