为什么我的嵌入字体渲染不正确?
我正在使用 google fonts api,该字体在 Google 上看起来很棒,但是当我尝试使用它时,它无法正确呈现。这是一个示例:
https://twitter.com/dontdie/status/129234318299111424/photo/ 1
这是在 Chrome 中,两个不同的选项卡。由于某些原因,Chrome 不使用“子像素渲染”( http://en.wikipedia.org/wiki/ Subpixel_rendering )在我的网站上,但在 Google 上它已打开。
I am using the google fonts api, the font looks great on Google, but when I try to use it, it doesn't render properly. Here is an example:
https://twitter.com/dontdie/status/129234318299111424/photo/1
this is in Chrome, two different tabs. For some reason, Chrome is not using "subpixel rendering" ( http://en.wikipedia.org/wiki/Subpixel_rendering ) on my site, but on google it is turned on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我已经明白了这一点。将这些规则添加到我的样式表中似乎可以解决此问题:
仅设置
subpixel-antialiased
不起作用,仅向正文添加背景颜色也不起作用。这可能可以简化为仅选择*
或html *
。此外,鉴于subpixel-antialiased
是默认设置,删除该规则也应该有效。I think I figured this out. adding these rules to my stylesheet seemed to fix it:
Just setting
subpixel-antialiased
didn't work, and just adding a background color to the body didn't work. This could probably be simplified to select just*
orhtml *
. Also, given thatsubpixel-antialiased
is the default, removing that rule should work as well.