Skip to content

Use adjustWidths for TrueType fonts if we handle them as OpenType (issue 5027, issue 5084, issue 6556, bug 1204903) #6736

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

Merged
merged 1 commit into from
Dec 8, 2015

Conversation

Snuffleupagus
Copy link
Collaborator

In Font_checkAndRepair we can decide that a font isn't TrueType, and instead parse it as CFF. In that case it's quite possible that the fontMatrix will be changed, and without calling adjustWidths we're failing to update the glyph widths correctly.

Fixes #5027.
Fixes #5084.
Fixes #6556.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1204903.

Edit: Also fixes #5213.

…issue 5027, issue 5084, issue 6556, bug 1204903)

In `Font_checkAndRepair` we can decide that a font isn't TrueType, and instead parse it as CFF. In that case it's quite possible that the `fontMatrix` will be changed, and without calling `adjustWidths` we're failing to update the glyph widths correctly.

Fixes 5027.
Fixes 5084.
Fixes 6556.
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1204903.
@Snuffleupagus
Copy link
Collaborator Author

@timvandermeij Thanks for asking lots of questions about this on IRC! I've updated the patch to hopefully cover all cases where the fontMatrix can change after the font file has been processed.

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 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/84e6668ced61fd5/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 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/a61e613beba4179/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/84e6668ced61fd5/output.txt

Total script time: 19.25 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Linux)


Success

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

Total script time: 20.07 mins

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

@Snuffleupagus
Copy link
Collaborator Author

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 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/fff2adc7c54787c/output.txt

@timvandermeij
Copy link
Contributor

This looks better to me! Let's remake the reference images just to be sure.

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/14eb3a3068b58cf/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Windows)


Success

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

Total script time: 19.11 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Dec 8, 2015

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/14eb3a3068b58cf/output.txt

Total script time: 20.00 mins

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

timvandermeij added a commit that referenced this pull request Dec 8, 2015
Use `adjustWidths` for TrueType fonts if we handle them as OpenType (issue 5027, issue 5084, issue 6556, bug 1204903)
@timvandermeij timvandermeij merged commit a966022 into mozilla:master Dec 8, 2015
@timvandermeij
Copy link
Contributor

Thank you for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants