如何访问字体?

How to get access to fonts?

我是字体和字体的新手。我已经阅读了很多关于如何让它们在网站上工作的 Whosebug 线程,但是,我很困惑 how/where 我可以下载:

.eot
.eot?#iefix
.woff
.ttf
.svg

为了 Gotham Book 和 Gotham Light?还是一般字体?

谢谢

网络字体需要特殊许可。

您可以在此处找到 Gotham Webfont: http://www.typography.com/fonts/gotham/overview/

有免费的替代品可用,例如 Google 网络字体 (https://www.google.com/fonts/)

选中此 link 以下载您想要的特定字体

http://www.typography.com/fonts/gotham/styles/

下载你的字体文件并编写代码来调用你的 css 文件中的字体,如下所示

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

根据您的项目,您可以通过不同的方式向网站添加特定字体, 通常最常见的是添加对您网站 header 的引用,例如:

<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>

然后你可以使用样式表中的字体添加一个 属性 比如:

 font-family: 'Open Sans', sans-serif;

否则,您可以直接在样式表中使用 @font-face 规则导入字体,然后使用它通过 font-family: 属性.

调用字体

Here's an article on @font-face I suggest.