mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Access this._onUnsupportedFeature
directly in FontFaceObject.getPathGenerator
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.
This commit is contained in:
parent
5a522a5c71
commit
fec8c4c43f
1 changed files with 4 additions and 6 deletions
|
@ -350,7 +350,7 @@ class FontFaceObject {
|
|||
isEvalSupported = true,
|
||||
disableFontFace = false,
|
||||
ignoreErrors = false,
|
||||
onUnsupportedFeature = null,
|
||||
onUnsupportedFeature,
|
||||
fontRegistry = null,
|
||||
}
|
||||
) {
|
||||
|
@ -405,11 +405,9 @@ class FontFaceObject {
|
|||
if (!this.ignoreErrors) {
|
||||
throw ex;
|
||||
}
|
||||
if (this._onUnsupportedFeature) {
|
||||
this._onUnsupportedFeature({
|
||||
featureId: UNSUPPORTED_FEATURES.errorFontGetPath,
|
||||
});
|
||||
}
|
||||
this._onUnsupportedFeature({
|
||||
featureId: UNSUPPORTED_FEATURES.errorFontGetPath,
|
||||
});
|
||||
warn(`getPathGenerator - ignoring character: "${ex}".`);
|
||||
|
||||
return (this.compiledGlyphs[character] = function (c, size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue