various fixes to tspan rendering

- properly retrieve getBBox() on input
- assign input argument to text_node variable
- locally scope secondary iterator j when offsetting substrings