问题
I'm using RaphaelJS for visually representing some data. The underlying technology is SVG so obviously things don't always work that well in IE, but the library does a relatively ok job of still rendering something useful, although it often tends to look pretty poor.
In any case, I can't seem to get around this basic issue. Text is rendered fine in Chrome or FireFox, but everything renders as bold and italic in IE8.
To see my issue in action, go to the RaphaelJS playground and use the following code
paper.text(100, 100, "this is the text")
Here is the result in Chrome and IE.
Is there any workaround for this?
回答1:
Have you tried .attr({"font-family":"xxxxxx","font-weight":400});
回答2:
Just for all those that find this page and have the same problem. The solution is the doctype used. You should (at least since GWT 2.x) use the <!DOCTYPE html>
if you do so Internet Explorer renders the ....
来源:https://stackoverflow.com/questions/6110037/raphaeljs-renders-all-text-as-italic-in-ie