我使用@font-face
来启用自定义字体。它适用于Firefox,IE,Safari和Mac上的Chrome。在使用Chrome的Windows 7上,10px的文字看起来不是黑色或灰色! ...经过更多测试:与Firefox(Windows)和Safari(Windows)相同的问题@ Windows 7中的font-face渲染
也许它与Windows ClearType呈现有关。但为什么它在Internet Explorer中工作?
直接链接到页面:http://www.light-work.de/chrome.html
It's真奇怪!只有10px字体大小(我需要的大小)才会出现问题。在light-work.de/webfontkit/
下,您可以看到样本概览。
一个更大的屏幕截图:http://light-work.de/styles/02.png
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>google chrome</title>
<style>
/* Generated by Font Squirrel */
@font-face {
font-family: 'M10Regular';
src: url('http://light-work.de/styles/m10/m10-webfont.eot');
src: url('http://light-work.de/styles/m10/m10-webfont.eot?#iefix') format('embedded-opentype'),
url('http://light-work.de/styles/m10/m10-webfont.woff') format('woff'),
url('http://light-work.de/styles/m10/m10-webfont.ttf') format('truetype'),
url('http://light-work.de/styles/m10/m10-webfont.svg#M10Regular') format('svg');
font-weight: normal;
font-style: normal;
}
body {
font-family: 'M10Regular';
line-height: 20px;
font-size: 10px;
color:#666666;
}
</style>
</head>
<body>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
</body>
</html>
如果你想要一个跨浏览器的兼容性,你总是可以使用谷歌字体http://www.google.com/webfonts – denislexic 2011-05-06 11:46:47
首先你应该尝试在这种情况下,正在验证你的html:http:// validator。 w3.org/ – AllisonC 2011-05-06 12:23:39