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

Fallback in readCmapTable, instead of using error, for TrueType fonts with unsupported cmap formats (bug 1200096) #6407

Merged
merged 1 commit into from
Sep 5, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096.

The problematic font has a format 2 cmap, which we've never supported properly. Prior to PR #2606, we were able to fallback to a working state, despite not having proper support for that cmap format.

Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that:

  • format 2 cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed.
  • Having a simple patch will make potential uplifts a lot easier.

[1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html

…onts with unsupported cmap formats (bug 1200096)

Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1200096.

The problematic font has a `format 2` cmap, which we've never supported properly. Prior to PR 2606, we were able to fallback to a working state, despite not having proper support for that cmap format.

Obviously the best/correct solution would be to implement actual support for more cmap formats[1]. However, I'm hoping that a simple patch will be OK for now, given that:
 - `format 2` cmaps seem to be quite rare in practice, since this has been broken for 2.5 years before anyone noticed.
 - Having a simple patch will make potential uplifts a lot easier.

[1] See the specification at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6cmap.html
@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2015

From: Bot.io (Windows)


Received

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

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

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

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

@pdfjsbot
Copy link

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/0e9356aae7154f6/output.txt

Total script time: 18.93 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 1, 2015

From: Bot.io (Linux)


Success

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

Total script time: 19.43 mins

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

@brendandahl
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

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

@pdfjsbot
Copy link

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 4, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/518e7f522d32cc3/output.txt

Total script time: 18.93 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 4, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/900615deb51ab6c/output.txt

Total script time: 18.94 mins

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

brendandahl added a commit that referenced this pull request Sep 5, 2015
Fallback in `readCmapTable`, instead of using `error`, for TrueType fonts with unsupported cmap formats (bug 1200096)
@brendandahl brendandahl merged commit 238e16f into mozilla:master Sep 5, 2015
@Snuffleupagus Snuffleupagus deleted the bug-1200096 branch September 5, 2015 09:43
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