Andrew said:
I tested it again (with FF 2 and IE 6) and multi-word font names get
ignored if I do either:
obj.style.fontFamily = "Timeees, 'New Century Schoolbook', serif";
or
obj.style.fontFamily = "Timeees, New Century Schoolbook, serif";
I named the first font intentionally wrong to see if 'New Century
Schoolbook' appears, and it doesn't. I get the default serif font.
Are you sure that the 'New Century Schoolbook' font is installed on your
computer? Without JS, does setting the style of an element to New Century
Schoolbook work?
I tried using JS to swap between the two list of font families:
"Pizza, 'New Century Schoolbook', 'Times New Roman', serif"
- and -
"Pizza, 'Comic Sans MS', 'New Century Schoolbook', Arial, serif"
When setting the element's fontFamily property to the top line above, I
would get Times New Roman and when setting it to the bottom line above, I
would get Comic Sans. I tried this in both Firefox 2 and IE7 with the same
results.
Ben