我想在我的网站上使用 Google 的 Roboto 字体,我正在关注本教程:
http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15
我已经下载了具有如下文件夹结构的文件:
现在我有三个问题:
- 我的
media/css/main.css
网址中有css。那么我需要把那个文件夹放在哪里呢? - 我是否需要从所有子文件夹中提取所有 eot、svg 等并放入
fonts
文件夹中? - 我是否需要创建 css 文件 fonts.css 并包含在我的基本模板文件中?
他用这个的例子
@font-face {
font-family: 'Roboto';
src: url('Roboto-ThinItalic-webfont.eot');
src: url('Roboto-ThinItalic-webfont.eot?#iefix') format('embedded-opentype'),
url('Roboto-ThinItalic-webfont.woff') format('woff'),
url('Roboto-ThinItalic-webfont.ttf') format('truetype'),
url('Roboto-ThinItalic-webfont.svg#RobotoThinItalic') format('svg'); (under the Apache Software License).
font-weight: 200;
font-style: italic;
}
如果我想要 dir 结构,我的 url 应该是什么样的:
/media/fonts/roboto