I’m trying to figure out how to apply the basic soft dynamic in the reference page of P5.js on to typography/text. at the moment i think that the only option is to draw the shapes of the letters via “beginShape()”
any smarter suggestions?
thsnks
Fundamentally it should be possible to combined the concepts from the “Soft Body” example with the p5.Font.textToPoints
function. The main issue is that textToPoints()
doesn’t provide a good way to determine which points should be connected to which. In characters with multiple parts (like an i
or a 0
) there’s one sequence of points to indicate what part of the shape and another sequence for the others, which are sometimes voids as with the slashed zero. As a result it is tricky to use the output of textToPoints
to draw a coherent shape. However, there are probably some other libraries out there that can turn a character into a set of splines given a certain font.