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

Ensure that Type0, i.e. composite, OpenType fonts with CFF tables are *not* treated as CFF fonts if their glyph mapping is non-default (issue 9915) #9938

Merged
merged 3 commits into from
Aug 1, 2018

Conversation

Snuffleupagus
Copy link
Collaborator

I've been hanging around, waiting for PDF.js 2.0 to be officially released, and fixing a few regressions/smaller issues during that time. This PR is a continuation on that theme.

This particular code-path has been the source of numerous regressions to date, so hopefully this patch won't cause any more of those. (All those regressions were, unfortunately, my "fault" as well.)

Fixes #9915.

…y decoded

This isn't directly related to the subsequent patch, but just something that I happened to notice while poking around in the font code.
…are *not* treated as CFF fonts if their glyph mapping is non-default (issue 9915)

This particular code-path has been the source of *numerous* regressions to date, so hopefully this patch won't cause any more of those.

Fixes 9915.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/132505bf9aabb2a/output.txt

@pdfjsbot
Copy link

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/7cd8b189c85e331/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/7cd8b189c85e331/output.txt

Total script time: 19.35 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/132505bf9aabb2a/output.txt

Total script time: 27.30 mins

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

@Snuffleupagus
Copy link
Collaborator Author

/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/1be0957304c9b10/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/1be0957304c9b10/output.txt

Total script time: 2.85 mins

Published

Copy link
Contributor

@brendandahl brendandahl left a comment

Choose a reason for hiding this comment

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

Looks good. We don't need to change any thing, but out of curiosity, have you looked into how PDFium handles this?

@timvandermeij timvandermeij merged commit 716acf6 into mozilla:master Aug 1, 2018
@timvandermeij
Copy link
Contributor

Thank you!

@timvandermeij
Copy link
Contributor

/botio makeref

(also for the other PR that landed before without this)

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2018

From: Bot.io (Linux m4)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2018

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/02c5672f0ff3250/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2018

From: Bot.io (Linux m4)


Success

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

Total script time: 19.21 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Aug 1, 2018

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/02c5672f0ff3250/output.txt

Total script time: 23.06 mins

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

@Snuffleupagus
Copy link
Collaborator Author

Looks good. We don't need to change any thing, but out of curiosity, have you looked into how PDFium handles this?

I attempt to look into this, and it appears that PDFium is basically passing all the font data to FreeType. Unfortunately, I'm getting lost in the FreeType code and cannot really tell where/how it's being handled.

@Snuffleupagus Snuffleupagus deleted the issue-9915 branch August 2, 2018 00:13
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.

Some fonts cannot display on PDF js correctly
4 participants