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

Function buildPath

libraries/p5.js:4608–4623  ·  view source on GitHub ↗
(glyphs, glyph)

Source from the content-addressed store, hash-verified

4606}
4607
4608function buildPath(glyphs, glyph) {
4609 if (glyph.isComposite) {
4610 for (var j = 0; j < glyph.components.length; j += 1) {
4611 var component = glyph.components[j];
4612 var componentGlyph = glyphs.get(component.glyphIndex);
4613 // Force the ttfGlyphLoader to parse the glyph.
4614 componentGlyph.getPath();
4615 if (componentGlyph.points) {
4616 var transformedPoints = transformPoints(componentGlyph.points, component);
4617 glyph.points = glyph.points.concat(transformedPoints);
4618 }
4619 }
4620 }
4621
4622 return getPath(glyph.points);
4623}
4624
4625// Parse all the glyphs according to the offsets from the `loca` table.
4626function parseGlyfTable(data, start, loca, font) {

Callers 1

ttfGlyphLoaderFunction · 0.85

Calls 2

transformPointsFunction · 0.85
getPathFunction · 0.85

Tested by

no test coverage detected