例如,当使用 π
显示希腊符号时,我在 Chrome 和 Safari 中得到的结果与 Firefox 中的结果截然不同。作为一些示例文本,我有:
Chrome:
Firefox:
有没有办法让 Webkit 渲染字母更接近 Gecko 的风格,我在这里更喜欢这种风格?
编辑:实际上,这个问题似乎与 Webkit 本身无关,因为它似乎在 Windows 7 中的 Chrome 下以我喜欢的方式呈现:(我正在使用 Snow Leopard,并没有费心去检查我的其他计算机,呵呵)
另外,有点题外话,但有谁知道为什么字体似乎渲染得有点Mac 上比 PC 上更大胆?
When displaying Greek symbols with, for example, π
, I get very different results in Chrome and Safari versus Firefox. As some example text, I have:
Chrome:
Firefox:
Is there a way to get Webkit to render the letters closer to Gecko's style, which I much prefer here?
EDIT: Actually, it seems the problem does not have to do with Webkit itself, as it seems to render the way I like it under Chrome in Windows 7: (I was using Snow Leopard and didn't bother to check on my other computers, heh)
Also, a bit offtopic, but does anyone know why the fonts seem to be rendered a bit more boldly on the Mac than on the PC?
发布评论
评论(3)
我猜测 Firefox 使用的是 Symbol 字体,而 Safari 使用的是具有正确字符的 unicode 字体。
在我的 Mac 上,这是有效的:
π
。此外,将容器的字体设置为 Times New Roman 似乎也有效。I would guess that firefox is using the Symbol font, whereas Safari is using whichever unicode font has the right characters.
On my Mac, this works:
<span style="font-family: Symbol">π</span>
. Also, setting the font of the container toTimes New Roman
seems to work as well.好吧,最奇怪的事情发生了。我再次查看我的网站,突然意识到希腊语的渲染非常完美。我不确定发生了什么,因为我认为我没有运行任何更新或任何东西,但问题现在已经消失了。当然对于遇到这个问题的其他人来说不是很有帮助,但这就是发生的事情......
Okay, so the weirdest thing happened. I was looking at my site again and suddenly realized that the Greek was rendering perfectly. Am not sure what happened, since I don't think I ran any updates or anything, but the problem's gone now. Not very helpful of course to others with this problem, but that's just what happened...
您的浏览器将使用其可用的任何字体进行渲染。某些字体可能会缺少某些字符,在这种情况下,浏览器将为这些字符使用另一种字体。如果在 CSS 中告诉浏览器字体系列是什么,它就可以更好地选择匹配的字体。
现在,浏览器将从衬线字体中提取丢失的字符。
当然,使用@font-face指令,您可以强制使用包含您需要的所有字符的字体。
Your browser will render using whatever fonts it has available. Some fonts may be missing certain characters, in which case the browser will use another font for those characers. If, in your CSS, you tell the browser what the font-family is, it can better pick a matching font.
Now the browser will pull in missing characters from a serif font.
Of course, with the
@font-face
directive, you can force the use of a font which has all the characters you need.