We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8108ec commit 74fe1f4Copy full SHA for 74fe1f4
src/glyphset.mjs
@@ -62,11 +62,11 @@ if(typeof Symbol !== 'undefined' && Symbol.iterator) {
62
63
/**
64
* @param {number} index
65
- * @return {opentype.Glyph}
+ * @return {opentype.Glyph | undefined}
66
*/
67
GlyphSet.prototype.get = function(index) {
68
// this.glyphs[index] is 'undefined' when low memory mode is on. glyph is pushed on request only.
69
- if (this.glyphs[index] === undefined) {
+ if (this.font._push && this.glyphs[index] === undefined) {
70
this.font._push(index);
71
if (typeof this.glyphs[index] === 'function') {
72
this.glyphs[index] = this.glyphs[index]();
0 commit comments