4

地图

http://i.stack.imgur.com/YZp6L.jpg

我有一个通过 Raphael JS 实现的地图,它包装了 VML 和 SVG 以支持跨 Web 浏览器绘图。

除了 IE 中的字体(6/7/8),一切看起来都不错

好像AntiAliasing打开了,在VML中渲染文字,文字看起来不清楚和模糊,请问有没有办法关闭AntiAliasing?

4

2 回答 2

0
  1. 尝试使用 not pxin font-size。使用pt%
  2. 您可以使用@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字体文件。

于 2014-07-23T12:50:41.840 回答
0

SVG标签,添加shape-rendering = 'crispEdges'

这能解决问题吗?

您也可以尝试font-smooth : never为 SVG 添加样式。

于 2012-02-05T05:39:26.403 回答