【发布时间】:2013-10-15 11:43:35
【问题描述】:
可以在没有互联网连接的情况下在本地网页 (XAMPP) 上使用下载的字体吗?我需要这个来查看字体,因为有些人可能负担不起互联网连接,他们只使用他们的电脑来工作。
这是网络字体:http://openfontlibrary.org/en/font/didact-gothic
我试过这个没有运气:http://css-tricks.com/snippets/css/using-font-face/
提前致谢!!!!
编辑
我认为存储文件的地方是问题,因为我有这个 .css 并且没有工作。我所有文件的位置是/opt/lammp/htdocs
@font-face {
font-family: 'DidactGothicMedium';
src: url('didactgothic.eot');
src: url('didactgothic.eot') format('embedded-opentype'),
url('didactgothic.woff') format('woff'),
url('didactgothic.ttf') format('truetype'),
url('didactgothic.svg#DidactGothicMedium') format('svg');
}
p {
font-family: 'Didact Gothic';
font-weight: normal;
font-style: normal;
padding-left: 25px;
padding-right: 25px;
}
input {
font-family: 'Didact Gothic';
font-weight: normal;
font-style: normal;
}
【问题讨论】:
-
你必须使用一个网络字体工具包,你可以从像 convertfonts.com 这样的网站下载,包括样式和字体文件,字体可以在本地开发,但是你首先需要一个用于下载 webkit 的字体的 otf 或 ttf 文件
-
非常感谢boom_Shiva!!现在的问题是我必须将所有文件放在哪里,因为我正在尝试加载它们并且没有结果。谢谢!!
-
你打算如何被没有互联网连接的人访问???
-
下载所有代码,稍后安装到本地
-
那只需将字体添加到下载中?