-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix handling of symbolic fonts and unicode cmaps. #12259
Conversation
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/78298cd5567f232/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/f192590539d2607/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/78298cd5567f232/output.txt Total script time: 26.98 mins
Image differences available at: http://54.67.70.0:8877/78298cd5567f232/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/f192590539d2607/output.txt Total script time: 30.52 mins
Image differences available at: http://54.215.176.217:8877/f192590539d2607/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 good to me, but I'd like @Snuffleupagus to also look at this since I'm not too familiar with the font logic.
src/core/fonts.js
Outdated
if ( | ||
platformId === 0 && | ||
(encodingId === 0 || // Unicode Default | ||
encodingId === 1 || // Unicode 1.1 |
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.
The indentation on the line and the next one seems off.
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.
I believe that it's a case of Prettier being stupid, since manually fixing the indentation results in linting failures :-(
The only way to address this would be to re-format the comments, e.g. like this:
if (
platformId === 0 &&
(encodingId === /* Unicode Default = */ 0 ||
encodingId === /* Unicode 1.1 = */ 1 ||
encodingId === /* Unicode BMP = */ 3)
) {
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.
Yes, that seems fine to me.
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/88604bd3b1b489d/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/88604bd3b1b489d/output.txt Total script time: 3.41 mins Published |
This unfortunately seems to break Compare with |
In issue 12120, the font has a 1,0 cmap and is marked symbolic which according to the spec means we should directly use the cmap instead of the extra steps that are defined in 9.6.6.4. However, just fixing that caused bug 1057544 to break. The font in bug 1057544 has a 0,1 cmap (Unicode 1.1) which we were not using, but is easy to support. We're also easily able to support some of the other unicode cmaps, so I added those as well. There was also a second issue with bug 1057544, the cmap doesn't have a mapping for the "quoteright" glyph, but it is defined in the post table. To handle this, I've moved post table as a fallback for any font that has an encoding.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/76d8455fbb23e47/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/8d42f51395b4b39/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/76d8455fbb23e47/output.txt Total script time: 27.11 mins
Image differences available at: http://54.67.70.0:8877/76d8455fbb23e47/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.215.176.217:8877/8d42f51395b4b39/output.txt Total script time: 29.25 mins
Image differences available at: http://54.215.176.217:8877/8d42f51395b4b39/reftest-analyzer.html#web=eq.log |
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 1 Live output at: http://54.67.70.0:8877/3e5b3d9ff52621b/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/3e5b3d9ff52621b/output.txt Total script time: 3.29 mins Published |
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 good to me, thank you!
/botio makeref |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/12c4d5486042f42/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.215.176.217:8877/be633fb13bec025/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/12c4d5486042f42/output.txt Total script time: 25.57 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/be633fb13bec025/output.txt Total script time: 27.04 mins
|
Nice work! |
In issue 12120, the font has a 1,0 cmap and is marked symbolic which according
to the spec means we should directly use the cmap instead of the extra steps
that are defined in 9.6.6.4. However, just fixing that caused bug 1057544 to
break. The font in bug 1057544 has a 0,1 cmap (Unicode 1.1) which we were not
using, but is easy to support. We're also easily able to support some of the
other unicode cmaps, so I added those as well.
Fixes #12120.