persist.js is a framework for the Sphere RPG engine that lets you store persistent data and code with persons and maps.
This script can wrap strings given either a character or a pixel width, breaking it into an array of lines.
Handy to side-step the issues with char-by-char word "jumping" with Sphere's text drawing functions.
Ever wished that Sphere's graphical engine could act a bit more like the old text consoles? This may well be what you're looking for!