Skip to content


Subversion checkout URL

You can clone with
Download ZIP


attr: font-size not working. #595

asenner opened this Issue · 7 comments

4 participants


paper.text(startBox.x2 + 30, startBox.y, 'Triggers').attr({
"font-size":"350px" // (Also tried 30, 30pt, 30px)

Font-size does not change whatsoever.

Google Chrome 19.0.1084.56 (Official Build 140965) m
OS Windows
WebKit 536.5 (@119244)
JavaScript V8
Flash 11,3,300,257
User Agent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5


just use a number, like attr({"font-size": 20});


If you look at the comment next to the font-size property you'll see the other values I used with no success, including, just the number, 30. The font-size will not change at all and I can't seem to find anyone else experiencing this issue.


yes, but have you tried with a javascript number not string - i.e 30 vs "30". Also I have tested and "30px" it is working ok. try the examples at (you can run them directly just press "Run". Those examples are working for me in firefox 12, opera and chrome:

var text1 = paper.text(230,120,"What is happiness?\nThe feeling that power \nincreases - that resistance \nis being overcome.\n Friedrich Nietzsche").
attr({"font-size": "32px", "font-weight": "800", fill: "yellow", stroke:"brown", "stroke-width": "3px"});


Yes, I have tried the value using just a number, not a string. Interesting. Like I said, I couldn't find anyone else having this issue so I came here to see if anyone had some input. I will keep messing with it and get back to you. Thanks for the quick responses! :)


did my raphael tutorial examples worked for you?

@tomasAlabes tomasAlabes closed this

There is an issue. If you have the following css:
* {
font-family: verdana;
font-size: 10pt;
then all Raphael text will be 10pt, even if you specify otherwise.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.