better text paragraph handling

takes into account spaces (insertSpace).
fix dy (new line), dy doesn't seems to work if last character is ' '.