-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Conversation
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.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2910d7b4b2aeba3/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2910d7b4b2aeba3/output.txt Total script time: 3.33 mins Published |
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/7960d69c06f0347/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/848c613548fc120/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/7960d69c06f0347/output.txt Total script time: 27.14 mins
Image differences available at: http://54.67.70.0:8877/7960d69c06f0347/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/848c613548fc120/output.txt Total script time: 29.38 mins
Image differences available at: http://54.215.176.217:8877/848c613548fc120/reftest-analyzer.html#web=eq.log |
There was a problem hiding this 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!
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/168dae54cf241ee/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/6db7e7116951c80/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/6db7e7116951c80/output.txt Total script time: 25.24 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/168dae54cf241ee/output.txt Total script time: 29.82 mins
|
Nice find; thanks! |
In
display/canvas.js
the accent offsets must be multiplied byfontSize
to make the offsets large enough. This affects both Type1 and CFF fonts. Another problem is incore/type1_parser.js
when the Type1 commandseac
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 ofseac
specify the offset of the left side bearing (LSB) points, not the offset of origins. This can be fixed incore/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:
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