JavaScript canvas text wrapper that automatically splits a string into lines on specified rule with optional alignments and padding.