canvas api: dividing text element at the text boundries