Raphaeljs renders all text as Italic in IE

2019-04-07 06:57发布

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.

Chrome IE8

Is there any workaround for this?

2条回答
【Aperson】
2楼-- · 2019-04-07 07:22

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 ....

查看更多
疯言疯语
3楼-- · 2019-04-07 07:26

Have you tried .attr({"font-family":"xxxxxx","font-weight":400});

查看更多
登录 后发表回答