1

我正在使用此代码

@font-face {
 font-family:myHelveticaUltraLight;
 src: local("Helvetica Neue UltraLight"),
      local("myHelveticaUltraLight"),
      url('../fonts/HelveticaNeueUltraLight.ttf'),
      url('../fonts/HelveticaNeueUltraLight.eot') format("opentype"); /* IE */
} 

为我网站的用户提供 Helvetica Neue Ultra Light。它适用于我 Mac 上的 Safari,但是当我在 Windows 上的 Chrome 或 Firefox 中测试它时,它没有显示该字体(它很厚)。知道可能是什么问题以及如何解决它吗?谢谢。

4

3 回答 3

2

有关在网页上使用 Helvetica Neue 的信息,请联系版权所有者。

于 2013-08-06T21:06:27.290 回答
1

我使用以下示例使用了 helvetica neue light

@font-face {
    font-family: 'helveticaneuelight';
    src: url('http://snippethosted.googlecode.com/svn/helveticaneue-light-webfont.eot');
    src: url('http://snippethosted.googlecode.com/svn/helveticaneue-light-webfont.eot?#iefix') format('embedded-opentype'),
         url('http://snippethosted.googlecode.com/svn/helveticaneue-light-webfont.woff') format('woff'),
         url('http://snippethosted.googlecode.com/svn/helveticaneue-light-webfont.ttf') format('truetype'),
         url('http://snippethosted.googlecode.com/svn/helveticaneue-light-webfont.svg#helveticaneuelight') format('svg');
    font-weight: normal;
    font-style: normal;
}
于 2014-02-18T10:41:51.197 回答
0

你没有 SVG 格式……那是 webkits 字体格式的首选。这是我的紧急“不知道 webkit 中的这种字体是怎么回事”工具包。这些是有时在 Windows 字体上困扰 webkit 的问题。

-webkit-transform: translateZ(0);

-webkit-backface-visibility: hidden;

 -webkit-perspective: 1000;

font-smooth: always;

-webkit-font-smoothing: subpixel-antialiased;
// or -webkit-font-smoothing: antialiased;
//  or adding a textshadow helps also sometimes:
text-shadow: 0 0 1px rgba(0,0,0,0.3);

此外,添加人造粗体通常看起来很糟糕。对于某些字体类型,字体在 webkit 中必须是粗体。

于 2013-08-06T21:33:00.350 回答