我刚刚拉起了一个项目,我正在对其进行一些修改,并注意到正在通过@font-face
提供的声明font-weight: lighter
,并且它不再在网站上工作(请参阅图像 - 顶部铬,底部ff)。昨天晚上我的系统(Windows)没有任何改变,今天酒吧被升级到Chrome 19.0.1084.46,我认为这是问题,但我想知道是否有其他人注意到了这一点,或者如果有修复?Chrome 19无法识别字体重量:打火机
谢谢。
我刚刚拉起了一个项目,我正在对其进行一些修改,并注意到正在通过@font-face
提供的声明font-weight: lighter
,并且它不再在网站上工作(请参阅图像 - 顶部铬,底部ff)。昨天晚上我的系统(Windows)没有任何改变,今天酒吧被升级到Chrome 19.0.1084.46,我认为这是问题,但我想知道是否有其他人注意到了这一点,或者如果有修复?Chrome 19无法识别字体重量:打火机
谢谢。
尝试使用数字代替相对项lighter
。例如:font-weight:100
将是最轻的。
有关于相对和绝对字体权重这里方便的文章: http://webdesign.about.com/od/fonts/qt/aa031807.htm
如果您正在使用的字体面对面的字体有多种样式(如你should)确保每个变体特别依赖于一个字体权重,这样每个变体都有自己的显式文件。否则,它有点像浏览器来完成它想做的事情。我发现从字体松鼠自动生成的代码不这样做(虽然也许他们已经更新了它们的包装)
请注意在下面的代码中,每个文件如何显式设置font-weight和font-style 。这没有留下猜测的余地。
@font-face {
font-family: 'CaviarDreams';
src: url('fonts/CaviarDreamsItalic-webfont.eot');
src: url('fonts/CaviarDreamsItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/CaviarDreamsItalic-webfont.woff') format('woff'),
url('fonts/CaviarDreamsItalic-webfont.ttf') format('truetype'),
url('fonts/CaviarDreamsItalic-webfont.svg#CaviarDreamsItalic') format('svg');
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: 'CaviarDreams';
src: url('fonts/CaviarDreams_BoldItalic-webfont.eot');
src: url('fonts/CaviarDreams_BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/CaviarDreams_BoldItalic-webfont.woff') format('woff'),
url('fonts/CaviarDreams_BoldItalic-webfont.ttf') format('truetype'),
url('fonts/CaviarDreams_BoldItalic-webfont.svg#CaviarDreamsBoldItalic') format('svg');
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'CaviarDreams';
src: url('fonts/CaviarDreams-webfont.eot');
src: url('fonts/CaviarDreams-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/CaviarDreams-webfont.woff') format('woff'),
url('fonts/CaviarDreams-webfont.ttf') format('truetype'),
url('fonts/CaviarDreams-webfont.svg#CaviarDreamsRegular') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'CaviarDreams';
src: url('fonts/CaviarDreams_Bold-webfont.eot');
src: url('fonts/CaviarDreams_Bold-webfont.eot?#iefix') format('embedded-opentype'),
url('fonts/CaviarDreams_Bold-webfont.woff') format('woff'),
url('fonts/CaviarDreams_Bold-webfont.ttf') format('truetype'),
url('fonts/CaviarDreams_Bold-webfont.svg#CaviarDreamsBold') format('svg');
font-weight: bold;
font-style: normal;
}
多数民众赞成我是如何奠定我的字体面出来,这是工作之前,现在使用数字已解决,但我认为这是一个错误铬时试图使用'font-weight:lighter',它只是没有似乎认出了这个电话,并自动假设'font-weight:normal'是更轻的。正如我所说,它以前在以前版本的Chrome中工作,因此我认为这是一个错误。 – Michael
我发现一般情况下,基本以外的fontweights通常会被浏览器以不同的方式解释。你的font-face CSS是否指定了字体的权重? – Damon
以前我从来没有打扰,但我认为它的东西,我将从现在开始作为@digitalbiscuits也建议 – Michael