Thanks, I think is the only way. I already read the many other posts of aligning text but they are all based on a premade svg and doesn't allow for changing dimensions. Therefore, i think as mentioned, the only way is to programatically create or modify the svg on runtime.
Thanks!