attr: font-size not working. #595

asenner opened this Issue Jun 22, 2012 · 7 comments


None yet
4 participants

asenner commented Jun 22, 2012

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});

asenner commented Jun 24, 2012

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"});

asenner commented Jun 24, 2012

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?

asenner commented Jun 25, 2012

I was having the issue on my work computer, going in this morning, will
let you know the results.

On Sunday, June 24, 2012 10:21:21 PM, Sebastián Gurin wrote:

did my raphael tutorial examples worked for you?

Reply to this email directly or view it on GitHub:
#595 (comment)

tomasAlabes closed this Feb 8, 2013

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