Raphaeljs 在 IE 中将所有文本呈现为斜体
我使用 RaphaelJS 来直观地表示一些数据。底层技术是 SVG,所以显然在 IE 中并不总是能很好地工作,但是该库在渲染有用的东西方面做得相对不错,尽管它通常看起来很差。
无论如何,我似乎无法回避这个基本问题。文本在 Chrome 或 FireFox 中渲染良好,但在 IE8 中所有内容都渲染为粗体和斜体。
要查看我的问题的实际情况,请转到 RaphaelJS Playground 并使用以下代码
paper.text(100, 100, "this is the text")
这是结果Chrome 和 IE。
有解决方法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过
.attr({"font-family":"xxxxxx","font-weight":400});
Have you tried
.attr({"font-family":"xxxxxx","font-weight":400});
仅供所有找到此页面并遇到相同问题的人使用。解决方案是使用的文档类型。您应该(至少从 GWT 2.x 开始)使用
如果您这样做,Internet Explorer 会呈现 ....
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 ....