- addRegion
- fitTextInBounds
- renderRegion
- makeStraightPaths
- makeArch
- makeRadialArch
- removeRegion
- render
- loadFonts
- papercut
addRegion creates and adds a region to a Bowlcut object
Parameters
regionOptionsObject allow for overrides for fill, stroke, etc. to be passed in on construction of a region.
Returns Object the region object
fitTextInBounds scales the region's text to fit inside the region's bounds, with no other transformations
Returns Object the scaled text as an opentype Path
renderRegion uses the provided bounds and top/bottom paths for a region to render an SVG path in between
Returns Object the rendered SVGPathElement
makeStraightPaths makes top and bottom paths from the verical edges of the region bounds
makeArch makes quadratic arcs for the top and bottom path of a region
Parameters
makeRadialArch sets the region's paths to a rainbow-shaped arch from the bounds and a bend strength
Parameters
radialBendNumber must be >= 0
removeRegion deletes a region from a Bowlcut wordmark
Parameters
regionObject the region to delete
render creates an SVGGroupElement containing the rendered region paths
Parameters
unifyBoolean? merges region paths with a union operation, removing overlaps. Expensive so defaults to false. (optional, defaultfalse)
Returns Object the group element
loadFonts takes an array of tuples like so: [[fontName, fontUrl], ...]]
Parameters
fontTuplesArray
Returns Object a promise resolved when the fonts have loaded
papercut generates the union of each group of characters in an svg DOM element
Parameters
domElemObject svg element generated from Bowlcut.
Returns Object New svg DOM element with unions applied.