您真正需要哪种字体的字体?
这是非常简单: http://fonts.googleapis.com/css?family=Ubuntu:regular,bold,italic 回报:
@media screen {
@font-face {
font-family: 'Ubuntu';
font-style: italic;
font-weight: normal;
src: local('Ubuntu Italic'), local('Ubuntu-Italic'), url('http://themes.googleusercontent.com/static/fonts/ubuntu/v4/kbP_6ONYVgE-bLa9ZRbvvvesZW2xOQ-xsNqO47m55DA.woff') format('woff');
}
}
@media screen {
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: normal;
src: local('Ubuntu'), url('http://themes.googleusercontent.com/static/fonts/ubuntu/v4/_xyN3apAT_yRRDeqB3sPRg.woff') format('woff');
}
}
@media screen {
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: bold;
src: local('Ubuntu Bold'), local('Ubuntu-Bold'), url('http://themes.googleusercontent.com/static/fonts/ubuntu/v4/0ihfXUL2emPh0ROJezvraD8E0i7KZn-EPnyo3HZu7kw.woff') format('woff');
}
}
下载每个WOFF的文件要使用,由“SRC”属性所看到,并把这些在静态目录,并在CSS中更改'src'网址以匹配您自己的网址。
例如,对于正常的字体,你应该下载:http://themes.googleusercontent.com/static/fonts/ubuntu/v4/_xyN3apAT_yRRDeqB3sPRg.woff 将其放入/static/ubuntu_normal.woff
并创建以下CSS:
@media screen {
@font-face {
font-family: 'Ubuntu';
font-style: normal;
font-weight: normal;
src: local('Ubuntu'), url('/static/ubuntu_normal.woff') format('woff');
}
}
您将需要添加的每您希望使用的字体样式或字体样式,粗体,斜体等。
可为空是一个很好的观点。客户端是否连接到interent? – Joe 2012-01-29 23:17:29