* Generate a stub glyph that can be filled with all metadata *except* * the "points" and "path" properties, which must be loaded only once * the glyph's path is actually requested for text shaping.
(font, index, parseGlyph, data, position, buildPath)
| 2168 | */ |
| 2169 | |
| 2170 | function ttfGlyphLoader(font, index, parseGlyph, data, position, buildPath) { |
| 2171 | return function() { |
| 2172 | var glyph = new _glyph.Glyph({index: index, font: font}); |
| 2173 | |
| 2174 | glyph.path = function() { |
| 2175 | parseGlyph(glyph, data, position); |
| 2176 | var path = buildPath(font.glyphs, glyph); |
| 2177 | path.unitsPerEm = font.unitsPerEm; |
| 2178 | return path; |
| 2179 | }; |
| 2180 | |
| 2181 | return glyph; |
| 2182 | }; |
| 2183 | } |
| 2184 | |
| 2185 | function cffGlyphLoader(font, index, parseCFFCharstring, charstring) { |
| 2186 | return function() { |
nothing calls this directly
no test coverage detected