Merge pull request #12931 from Snuffleupagus/errorFontLoadNative-no-fallback-bar
Stop showing the fallback bar for "errorFontLoadNative" errors (PR 10539 follow-up)
This commit is contained in:
commit
31b78921ca
@ -350,7 +350,7 @@ class FontFaceObject {
|
|||||||
isEvalSupported = true,
|
isEvalSupported = true,
|
||||||
disableFontFace = false,
|
disableFontFace = false,
|
||||||
ignoreErrors = false,
|
ignoreErrors = false,
|
||||||
onUnsupportedFeature = null,
|
onUnsupportedFeature,
|
||||||
fontRegistry = null,
|
fontRegistry = null,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
@ -405,11 +405,9 @@ class FontFaceObject {
|
|||||||
if (!this.ignoreErrors) {
|
if (!this.ignoreErrors) {
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
if (this._onUnsupportedFeature) {
|
this._onUnsupportedFeature({
|
||||||
this._onUnsupportedFeature({
|
featureId: UNSUPPORTED_FEATURES.errorFontGetPath,
|
||||||
featureId: UNSUPPORTED_FEATURES.errorFontGetPath,
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
warn(`getPathGenerator - ignoring character: "${ex}".`);
|
warn(`getPathGenerator - ignoring character: "${ex}".`);
|
||||||
|
|
||||||
return (this.compiledGlyphs[character] = function (c, size) {
|
return (this.compiledGlyphs[character] = function (c, size) {
|
||||||
|
@ -1089,6 +1089,12 @@ const PDFViewerApplication = {
|
|||||||
featureId,
|
featureId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Don't show the fallback bar for things that are *very* unlikely to cause
|
||||||
|
// user-visible errors, to avoid bothering the user unnecessarily.
|
||||||
|
switch (featureId) {
|
||||||
|
case UNSUPPORTED_FEATURES.errorFontLoadNative:
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Only trigger the fallback once so we don't spam the user with messages
|
// Only trigger the fallback once so we don't spam the user with messages
|
||||||
// for one PDF.
|
// for one PDF.
|
||||||
if (this.fellback) {
|
if (this.fellback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user