Raphaeljs renders all text as Italic in IE

早过忘川 提交于 2019-12-13 12:03:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!