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

Only choose a (3, 1) cmap table for TrueType fonts that have an encoding specified (issue 6410) #6425

Merged
merged 1 commit into from
Sep 9, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

For (1, 0) cmaps, we have two different codepaths depending on whether the font has/hasn't got an encoding. But with (3, 1) cmaps we don't have a good fallback when the encoding is missing, hence this patch changes readCmapTable to only choose a (3, 1) cmap table if the font is non-symbolic and an encoding exists. Without this, we'll not be able to successfully create a working glyph map for some TrueType fonts with (3, 1) cmap tables.

Fixes #6410.

Please note: I'm waiting to hear back from the issue reporter if it's OK for us to use the PDF file as a test-case, since I'd prefer not having to create (yet another) reduced test-case.

r? @brendandahl

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 7, 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/cdb5da75e94a0ba/output.txt

…ing specified (issue 6410)

For (1, 0) cmaps, we have two different codepaths depending on whether the font has/hasn't got an encoding. But with (3, 1) cmaps we don't have a good fallback when the encoding is missing, hence this patch changes `readCmapTable` to only choose a (3, 1) cmap table if the font is non-symbolic *and* an encoding exists. Without this, we'll not be able to successfully create a working glyph map for some TrueType fonts with (3, 1) cmap tables.

Fixes 6410.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Sep 7, 2015

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/5e467728a5f3780/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 7, 2015

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/4133c307222e84c/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 7, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/4133c307222e84c/output.txt

Total script time: 19.07 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 7, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/5e467728a5f3780/output.txt

Total script time: 19.50 mins

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

@brendandahl
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2015

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2015

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/266a8b6f4a1667d/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2015

From: Bot.io (Windows)


Success

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

Total script time: 18.22 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 9, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/266a8b6f4a1667d/output.txt

Total script time: 19.55 mins

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

brendandahl added a commit that referenced this pull request Sep 9, 2015
Only choose a (3, 1) cmap table for TrueType fonts that have an encoding specified (issue 6410)
@brendandahl brendandahl merged commit ded4f31 into mozilla:master Sep 9, 2015
@Snuffleupagus Snuffleupagus deleted the issue-6410 branch September 9, 2015 22:03
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.

3 participants