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

Prevent readCmapTable from failing if the cmap is missing in TrueType fonts #6607

Merged
merged 1 commit into from
Nov 9, 2015
Merged

Prevent readCmapTable from failing if the cmap is missing in TrueType fonts #6607

merged 1 commit into from
Nov 9, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Nov 8, 2015

From: Bot.io (Linux)


Received

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

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

@@ -3227,7 +3227,7 @@ var Font = (function FontClosure() {
*/
function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) {
var segment;
var start = (font.start ? font.start : 0) + cmap.offset;
var start = (font.start ? font.start : 0) + (cmap ? cmap.offset : 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Handle this special case in the caller -- I don't think we shall read any data below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that that would become messy on the caller side, since we're relying on readCmapTable to return something in order for the glyph mapping to work (see https://github.com/mozilla/pdf.js/blob/master/src/core/fonts.js#L4224-L4229 and below).

How about the updated version of the patch, which returns immediately for this (hopefully) rare case?

@yurydelendik
Copy link
Contributor

looks good.

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/8fc89f00be7fdd8/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/6afc0ec272ec4ca/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/8fc89f00be7fdd8/output.txt

Total script time: 18.64 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/6afc0ec272ec4ca/output.txt

Total script time: 20.13 mins

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

@yurydelendik
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/40fe55676e1f7a1/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/4af951ec8c94a3f/output.txt

yurydelendik added a commit that referenced this pull request Nov 9, 2015
Prevent `readCmapTable` from failing if the `cmap` is missing in TrueType fonts
@yurydelendik yurydelendik merged commit 5b2015b into mozilla:master Nov 9, 2015
@yurydelendik
Copy link
Contributor

thank you for the patch

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/4af951ec8c94a3f/output.txt

Total script time: 19.02 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Nov 9, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/40fe55676e1f7a1/output.txt

Total script time: 20.03 mins

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

@Snuffleupagus Snuffleupagus deleted the TrueType-without-cmap branch November 16, 2015 21: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.

None yet

3 participants