如何在服务器中安装字体 [英] How to install a Font in server

查看:164
本文介绍了如何在服务器中安装字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载并在我的系统中安装了一个字体,然后我在我的项目中使用这种字体,它在本地系统工作正常,但当我上传这个页面到服务器不工作。如何在服务器中安装字体?或者我如何解决这个问题?

I have downloaded and installed a font in my system, then i used this font in my project, its worked fine in local system, but when i upload this page to server its not working. How can i install a font in server? or How can i solve this issue?

请帮助我!!!!

推荐答案

使用CSS3,可以在网站上嵌入字体,即使它在用户的机器上不可用。

With CSS3 it is possible to embed fonts on websites even if it isn't available on the user's machine.

首先将您的字体上传到服务器上的目录。

First upload your font to a directory on your server.

然后在CSS中注册该字体您可以像这样使用它:

Then register that font in your CSS so that you can use it like so:

@font-face {
 font-family: 'Raspoutine Medium';
  src: url(http://site/fonts/Raspoutine Medium.ttf);
}
Then, to use it on elements within your site:
body {
font-family: 'Raspoutine Medium', Arial, Helvetica, san-serif;
}

(请参阅http://www.w3.org/TR/css3-fonts/#the-font-face-rule

请注意,这将只适用于特定的现代浏览器,即当前版本的Firefox,Chrome,Safari,Opera和IE9。 IE8和旧版本的IE不支持这一点,所以用后退字体来声明和测试网站是很好的。

Note that this will only work in select modern browsers, namely current versions of Firefox, Chrome, Safari, Opera, and IE9. IE8 and older versions of IE don't support this so it's good to declare and test the site with a 'fall back' font.

另外请注意,问题取决于字体..

Also note that there may be licensing issues depending on the font..

这篇关于如何在服务器中安装字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆