如何防止IE和FF中位图字体抗锯齿

发布于 2024-12-24 21:22:58 字数 471 浏览 7 评论 0 原文

我有一个基本的图标位图字体。

它在 Chrome 中很清晰,但 IE 和 FF 中的字体平滑使图标看起来模糊。

关于如何解决该问题有什么建议吗?

屏幕截图: https://i.sstatic.net/MxiOh.jpg

字体是使用 http://fontstruct.com

@font-face 是由 http://www.fontsquirrel.com/fontface/generator 使用最佳设置。还尝试专家删除字体提示,结果相同。

谢谢。

I have a basic bitmap font for icons.

It's crisp in Chrome but the font smoothing in IE and FF makes the icons look blurry.

Any suggestion on how to fix the issue?

Screenshot: https://i.sstatic.net/MxiOh.jpg

Font was created with http://fontstruct.com

@font-face was generated by http://www.fontsquirrel.com/fontface/generator using optimal setting. Also tried expert to remove font hinting with same result.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

○愚か者の日 2024-12-31 21:22:58

它与不同浏览器和操作系统中的文本渲染有关。我相信 webkit 浏览器(Safari 和 Chrome)的默认设置是subpixel-antialiased。您可以尝试使用 font-smooth css 属性,尽管我不确定它的支持范围有多大。 Typekit 有很多关于文本渲染的文章可能想看一下,但如果您正在寻找跨多个浏览器的极其一致的外观,那么最好的选择是图像精灵。

It has to do with text rendering in different browsers and operating systems. I believe the default for webkit browsers (Safari and Chrome) is subpixel-antialiased. You may try playing around with the font-smooth css property, though I'm not sure how widely it is supported. Typekit has a bunch of articles on text rendering you might like to take a look at, but if you are looking for an extremely consistent look across multiple browsers, your best option is an image sprite.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文