MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / parseGlyfTable

Function parseGlyfTable

libraries/p5.js:4626–4642  ·  view source on GitHub ↗
(data, start, loca, font)

Source from the content-addressed store, hash-verified

4624
4625// Parse all the glyphs according to the offsets from the `loca` table.
4626function parseGlyfTable(data, start, loca, font) {
4627 var glyphs = new glyphset.GlyphSet(font);
4628 var i;
4629
4630 // The last element of the loca table is invalid.
4631 for (i = 0; i < loca.length - 1; i += 1) {
4632 var offset = loca[i];
4633 var nextOffset = loca[i + 1];
4634 if (offset !== nextOffset) {
4635 glyphs.push(i, glyphset.ttfGlyphLoader(font, i, parseGlyph, data, start + offset, buildPath));
4636 } else {
4637 glyphs.push(i, glyphset.glyphLoader(font, i));
4638 }
4639 }
4640
4641 return glyphs;
4642}
4643
4644exports.parse = parseGlyfTable;
4645

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected