Add more categories of unsupported features.

Fixes #11815
This commit is contained in:
Brendan Dahl 2020-04-30 15:27:37 -07:00
parent b6f69d47b6
commit b1be33c96f
4 changed files with 32 additions and 14 deletions

View file

@ -82,7 +82,9 @@ class BaseFontLoader {
try {
await nativeFontFace.loaded;
} catch (ex) {
this._onUnsupportedFeature({ featureId: UNSUPPORTED_FEATURES.font });
this._onUnsupportedFeature({
featureId: UNSUPPORTED_FEATURES.errorFontLoadNative,
});
warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);
// When font loading failed, fall back to the built-in font renderer.
@ -400,7 +402,9 @@ class FontFaceObject {
throw ex;
}
if (this._onUnsupportedFeature) {
this._onUnsupportedFeature({ featureId: UNSUPPORTED_FEATURES.font });
this._onUnsupportedFeature({
featureId: UNSUPPORTED_FEATURES.errorFontGetPath,
});
}
warn(`getPathGenerator - ignoring character: "${ex}".`);