(font, glyphs)
| 2133 | // a deferred glyph loader, for retrieving glyphs only once they are absolutely |
| 2134 | // necessary, to keep the memory footprint down. |
| 2135 | function GlyphSet(font, glyphs) { |
| 2136 | this.font = font; |
| 2137 | this.glyphs = {}; |
| 2138 | if (Array.isArray(glyphs)) { |
| 2139 | for (var i = 0; i < glyphs.length; i++) { |
| 2140 | this.glyphs[i] = glyphs[i]; |
| 2141 | } |
| 2142 | } |
| 2143 | |
| 2144 | this.length = (glyphs && glyphs.length) || 0; |
| 2145 | } |
| 2146 | |
| 2147 | GlyphSet.prototype.get = function(index) { |
| 2148 | if (typeof this.glyphs[index] === 'function') { |
nothing calls this directly
no outgoing calls
no test coverage detected