Only check isType3Font
the first time that TranslatedFont.loadType3Data
is called
If the `TranslatedFont.type3Loaded` property exists, then you already know that the font must be a Type3 one.
This commit is contained in:
parent
f3ff526019
commit
835b5ffddd
@ -3378,13 +3378,12 @@ class TranslatedFont {
|
||||
}
|
||||
|
||||
loadType3Data(evaluator, resources, task) {
|
||||
if (!this.font.isType3Font) {
|
||||
throw new Error("Must be a Type3 font.");
|
||||
}
|
||||
|
||||
if (this.type3Loaded) {
|
||||
return this.type3Loaded;
|
||||
}
|
||||
if (!this.font.isType3Font) {
|
||||
throw new Error("Must be a Type3 font.");
|
||||
}
|
||||
// When parsing Type3 glyphs, always ignore them if there are errors.
|
||||
// Compared to the parsing of e.g. an entire page, it doesn't really
|
||||
// make sense to only be able to render a Type3 glyph partially.
|
||||
|
Loading…
x
Reference in New Issue
Block a user