-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Stop showing the fallback bar for "errorFontLoadNative" errors (PR 10539 follow-up) #12931
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
Stop showing the fallback bar for "errorFontLoadNative" errors (PR 10539 follow-up) #12931
Conversation
…539 follow-up) With PR 10539, we'll now always attempt to fallback to the PDF.js built-in font renderer for fonts that fail to load (i.e. are rejected by the sanitizer). Generally speaking, these errors are the result of insufficient validation in the PDF.js font code, however in almost all cases we've seen thus far our built-in font renderer manages just fine. However, we still trigger the `onUnsupportedFeature` reporting, which in Firefox causes the fallback bar to be displayed. Given that, in a majority of cases[1], things look fine it seems unfortunate to bother the user with the fallback bar here. Note that even though we no longer show the fallback bar in this case, we still report telemetry as before. --- [1] The only *known* case where things aren't fine with the built-in font renderer is issue 10232, however that document is sufficiently broken that there's a couple of other things that will trigger the fallback bar.
…thGenerator` Given that `FontFaceObject` is not exposed in the public API, but only accessed internally, there's no need to assume that a `FontFaceObject`-instance is ever initialized without `onUnsupportedFeature` being provided. This is also consistent with the `BaseFontLoader` implementation.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/caa90d4b45f972f/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://3.101.106.178:8877/c16b7072a2aee57/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/caa90d4b45f972f/output.txt Total script time: 27.24 mins
Image differences available at: http://54.67.70.0:8877/caa90d4b45f972f/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/c16b7072a2aee57/output.txt Total script time: 28.39 mins
Image differences available at: http://3.101.106.178:8877/c16b7072a2aee57/reftest-analyzer.html#web=eq.log |
Looks good to me; thanks! |
With PR #10539, we'll now always attempt to fallback to the PDF.js built-in font renderer for fonts that fail to load (i.e. are rejected by the sanitizer). Generally speaking, these errors are the result of insufficient validation in the PDF.js font code, however in almost all cases we've seen thus far our built-in font renderer manages just fine.
However, we still trigger the
onUnsupportedFeature
reporting, which in Firefox causes the fallback bar to be displayed. Given that, in a majority of cases[1], things look fine it seems unfortunate to bother the user with the fallback bar here.Note that even though we no longer show the fallback bar in this case, we still report telemetry as before.
[1] The only known case where things aren't fine with the built-in font renderer is issue #10232, however that document is sufficiently broken that there's a couple of other things that will trigger the fallback bar.