Merge pull request #2239 from yurydelendik/no-glyphs-message
Stops font processing when valid glyphs are absent in the font
This commit is contained in:
commit
19002cc8a3
@ -161,7 +161,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
|||||||
translated = this.translateFont(font, xref, resources,
|
translated = this.translateFont(font, xref, resources,
|
||||||
dependency);
|
dependency);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
translated = { error: e };
|
translated = { error: e instanceof Error ? e.message : e };
|
||||||
}
|
}
|
||||||
font.translated = translated;
|
font.translated = translated;
|
||||||
|
|
||||||
|
@ -3557,6 +3557,10 @@ var Font = (function FontClosure() {
|
|||||||
this.glyphNameMap = properties.glyphNameMap;
|
this.glyphNameMap = properties.glyphNameMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ids.length === 0) {
|
||||||
|
error('Valid glyph data is not found');
|
||||||
|
}
|
||||||
|
|
||||||
// Converting glyphs and ids into font's cmap table
|
// Converting glyphs and ids into font's cmap table
|
||||||
cmap.data = createCMapTable(glyphs, ids);
|
cmap.data = createCMapTable(glyphs, ids);
|
||||||
var unicodeIsEnabled = [];
|
var unicodeIsEnabled = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user