http://i.stack.imgur.com/YZp6L.jpg!
我有一个通过 Raphael JS 实现的地图,它包装了 VML 和 SVG 以支持跨 Web 浏览器绘图。
除了 IE 中的字体(6/7/8),一切看起来都不错
好像AntiAliasing打开了,在VML中渲染文字,文字看起来不清楚和模糊,请问有没有办法关闭AntiAliasing?
http://i.stack.imgur.com/YZp6L.jpg!
我有一个通过 Raphael JS 实现的地图,它包装了 VML 和 SVG 以支持跨 Web 浏览器绘图。
除了 IE 中的字体(6/7/8),一切看起来都不错
好像AntiAliasing打开了,在VML中渲染文字,文字看起来不清楚和模糊,请问有没有办法关闭AntiAliasing?
px
in font-size
。使用pt
或%
。@font-face
字体eot
格式。自定义字体在没有抗锯齿的情况下呈现。例子:
<html>
<head>
<style type="text/css">
@font-face {
font-family:comic;
src:url(http://valid_url/some_font_file.eot);
}
</style>
</head>
<body>
<p style="font-family: comic; font-size: 18pt;">This paragraph uses the font-face
rule defined in the above style element. The rule embeds an OpenType file for the
Comic Sans font. </p>
</body>
</html>
您可以使用FontSquirrel生成器生成EOT
字体文件。
到SVG
标签,添加shape-rendering = 'crispEdges'
这能解决问题吗?
您也可以尝试font-smooth : never
为 SVG 添加样式。