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

Accent positioning in Type1 seac glyphs #12270

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

janpe2
Copy link
Contributor

@janpe2 janpe2 commented Aug 23, 2020

In display/canvas.js the accent offsets must be multiplied by fontSize to make the offsets large enough. This affects both Type1 and CFF fonts. Another problem is in core/type1_parser.js when the Type1 command seac is handled. There is an error in the Adobe Type1 spec. See chapter 6 in Type1 Font Format Supplement, which provides an errata: The arguments of seac specify the offset of the left side bearing (LSB) points, not the offset of origins. This can be fixed in core/type1_parser.js by adding the difference of the LSB values.

I didn't add a new reference test case because the following existing cases will do the job and now they are finally rendered correctly:

  • issue818
  • issue4573
  • issue4801
  • bug1308536
  • glyph_accent

Fixes #4130
Fixes #12253
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=1654296
Fixes https://bugzilla.mozilla.org/show_bug.cgi?id=845409

See also:
Type1 Spec
Type1 Font Format Supplement

In `display/canvas.js` the accent offsets must be multiplied by `fontSize` to make the offsets large enough. Another problem is in `core/type1_parser.js` when the Type1 command `seac` is handled. There is an error in the Adobe Type1 spec. See chapter 6 in Type1 Font Format Supplement, which provides an errata: The arguments of `seac` specify the offset of the left side bearing (LSB) points, not the offset of origins. This can be fixed in `core/type1_parser.js` by adding the difference of the LSB values.
@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/2910d7b4b2aeba3/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2910d7b4b2aeba3/output.txt

Total script time: 3.33 mins

Published

@Snuffleupagus
Copy link
Collaborator

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/7960d69c06f0347/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/848c613548fc120/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/7960d69c06f0347/output.txt

Total script time: 27.14 mins

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

Image differences available at: http://54.67.70.0:8877/7960d69c06f0347/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/848c613548fc120/output.txt

Total script time: 29.38 mins

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

Image differences available at: http://54.215.176.217:8877/848c613548fc120/reftest-analyzer.html#web=eq.log

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@Snuffleupagus
Copy link
Collaborator

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/168dae54cf241ee/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/6db7e7116951c80/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/6db7e7116951c80/output.txt

Total script time: 25.24 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/168dae54cf241ee/output.txt

Total script time: 29.82 mins

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

@timvandermeij timvandermeij merged commit 34cec29 into mozilla:master Aug 24, 2020
@timvandermeij
Copy link
Contributor

Nice find; thanks!

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.

Incorrectly rendered umlauts Misplaced dieresis in umlauts and spurious character displayed
4 participants