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

Repair CFF fonts if stem hints are in wrong order #10277

Merged
merged 1 commit into from
Jan 3, 2019

Conversation

janpe2
Copy link
Contributor

@janpe2 janpe2 commented Nov 20, 2018

Fixes #10014
Fixes #10084

The embedded CFF fonts fail to follow CFF Type2 specification, page 11:

Hints: zero or more of each of the following hint operators, in exactly the following order: hstem, hstemhm, vstem, vstemhm, cntrmask, hintmask.

In the issues, the operators are in wrong order: first vstem and then hstem. When this happens, my patch overwrites operators hstem and hstemhm with codes vstem or vstemhm. The arguments remain in the byte array. (This is somewhat similar to the handling of dotsection in cff_parser.js.) The resulting new vertical stem hints are pointless, of course. However, all I can see is that the glyphs become only slightly blurrier because they are rendered without hstem hints. The text is still easy to read.

@brendandahl
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Jan 2, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/2eb0399181f2b42/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 2, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/39fb5de04351c3f/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 2, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2eb0399181f2b42/output.txt

Total script time: 17.79 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Jan 2, 2019

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/39fb5de04351c3f/output.txt

Total script time: 23.37 mins

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

@brendandahl
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

pdfjsbot commented Jan 3, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/6d02149a5257d9c/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jan 3, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/715db6aca425d81/output.txt

@brendandahl brendandahl merged commit e2686db into mozilla:master Jan 3, 2019
@pdfjsbot
Copy link

pdfjsbot commented Jan 3, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/715db6aca425d81/output.txt

Total script time: 16.28 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Jan 3, 2019

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/6d02149a5257d9c/output.txt

Total script time: 21.37 mins

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

@timvandermeij timvandermeij removed the request for review from brendandahl January 3, 2019 21:27
@janpe2 janpe2 deleted the cff-stems branch March 10, 2020 16:55
This pull request was closed.
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.

4 participants