You can do the following, but itβs not very pretty and destroys the encapsulation provided by Raphael. Consider the following:
text_element = r.text(10, 10, "Text in\nRaphael\nis a pain"); text_element.node.childNodes[0].setAttribute('dy', 0); text_element.node.childNodes[1].setAttribute('dy', 5); text_element.node.childNodes[2].setAttribute('dy', 5);
This will produce overlapping lines of text with default font settings.
If I open a better way, I will update my answer.
M. Anthony Aiello
source share