I’m trying to write text with Raphael JS, but it completely ignores the text style attributes. Other attributes like fill, fill-opacity, cursor etc. will work, but font-size, font-family etc. won’t. Here’s my code:
paper.text(40, 80, 'teste').attr({fill: '#fff', 'font-size': 120});
Note that the ‘fill’ attribute works perfectly, but the ‘font-size’ doesn’t. I’ve searched the forum and found a lot of questions answered about text problems (like this one), but no one seems to be having this specific kind of problem.
Any idea of what could I do? Thanks in advance.
Ok, I’ve managed to solve it. There was a CSS rule overriding every text style:
I haven’t write the CSS, plus this is my first experience with Raphael JS, so I was twice unaware of it. Hope my case can help someone in the future. Thanks.