如果我的用户没有我的网站字体,我怎么能让他们自动下载我的网站字体呢?

时间:2023-01-13 10:03:48

My website uses the font ff-clifford-eighteen-web-pro-1. I want all my text to be displayed using that font even for the users that don't have it installed on their machine.

我的网站使用的字体fff -clifford- 18 -pro-1。我希望我的所有文本都能使用那种字体显示,即使用户没有在他们的机器上安装它。

Is it possible?

是可能的吗?

6 个解决方案

#1


5  

You can use the @font-face generator. It allows you to upload your fonts and it will create a nifty .zip download with CSS and all the related files you need to get your custom font working for your site.

您可以使用@font-face生成器。它允许你上传你的字体,它将创建一个漂亮的。zip下载与CSS和所有相关文件,你需要使你的自定义字体为你的网站工作。

http://www.fontsquirrel.com/fontface/generator

http://www.fontsquirrel.com/fontface/generator

They also have a whole lot of licensed font-kits ready for use on your site too:

他们也有很多授权的字体工具包准备在你的网站上使用:

http://www.fontsquirrel.com/fontface

http://www.fontsquirrel.com/fontface

Another great site that allows you to "lease" licensed fonts is TypeKit.

另一个允许你“租借”许可字体的网站是TypeKit。

http://typekit.com/

http://typekit.com/

#2


2  

You can't. If the font is not on the system where the browser is, the font will not be found and cannot be loaded.

你不能。如果字体不在浏览器所在的系统上,则不会找到该字体并无法加载。

You will need to distribute the font to the client systems (if you have the licensing to do that).

您需要将字体分发给客户端系统(如果您有许可证的话)。

#3


1  

Short answer: you can't

简短的回答是:你不能

Long answer: you could, but it's not easy and not widely supported. Read this article for more information.

长话短说:你可以,但这并不容易,也没有得到广泛的支持。更多信息请阅读本文。

#4


1  

I use Cufon. Works great, but you also have to verify licensing.

我使用Cufon。工作很好,但你也必须验证许可。

#5


0  

Here is a link to A million ways to embed custom fonts (and keep typography nerds off your back)

这里有一个链接,你可以找到成千上万种嵌入自定义字体的方法(同时也可以让字体设计的书呆子们远离你)

He recommends sIFR3

他建议sIFR3

#6


0  

With the font stored in a font folder (ex: fontFolder), you would use the @font-face generator to automatically make the user download the font so it would appear wherever on the site you specify. Below, fontFolder represents the directory (folder) where the font files live, and fontName represents the font name (sitting inside the fontFolder). If you currently have the .eot .tff .woff, and .svg variations of the font stored in the fontFolder, you can copy the below code into the top of your style sheet and replace fontFolder with your own directory's name, and replace fontName with the name of your font:

将字体存储在字体文件夹中(例如:fontFolder),您将使用@font-face生成器自动让用户下载字体,以便在指定的站点上显示它。在下面,fontFolder代表字体文件所在的目录(文件夹),而fontName代表字体名称(位于fontFolder中)。如果您当前拥有.eot .tff .woff,以及存储在fontFolder中的字体的.svg变体,您可以将下面的代码复制到样式表的顶部,并将fontFolder替换为您自己的目录的名称,并将fontName替换为您的字体名称:

@font-face {

  font-family: "fontName";

  src: url('fontFolder/fontName.eot');

  src: url('fontFolder/fontName.eot?#iefix') format('embedded-opentype'), 

  url('fontFolder/fontName.woff') format('woff'), 

  url('fontFolder/fontName.ttf') format('truetype'), 

  url('fontFolder/fontName.svg')format('svg');
}

When you're ready to use your font, just use its name:

当你准备使用你的字体时,只需使用它的名字:

h1 {
    font-family: yourFont;
}

#1


5  

You can use the @font-face generator. It allows you to upload your fonts and it will create a nifty .zip download with CSS and all the related files you need to get your custom font working for your site.

您可以使用@font-face生成器。它允许你上传你的字体,它将创建一个漂亮的。zip下载与CSS和所有相关文件,你需要使你的自定义字体为你的网站工作。

http://www.fontsquirrel.com/fontface/generator

http://www.fontsquirrel.com/fontface/generator

They also have a whole lot of licensed font-kits ready for use on your site too:

他们也有很多授权的字体工具包准备在你的网站上使用:

http://www.fontsquirrel.com/fontface

http://www.fontsquirrel.com/fontface

Another great site that allows you to "lease" licensed fonts is TypeKit.

另一个允许你“租借”许可字体的网站是TypeKit。

http://typekit.com/

http://typekit.com/

#2


2  

You can't. If the font is not on the system where the browser is, the font will not be found and cannot be loaded.

你不能。如果字体不在浏览器所在的系统上,则不会找到该字体并无法加载。

You will need to distribute the font to the client systems (if you have the licensing to do that).

您需要将字体分发给客户端系统(如果您有许可证的话)。

#3


1  

Short answer: you can't

简短的回答是:你不能

Long answer: you could, but it's not easy and not widely supported. Read this article for more information.

长话短说:你可以,但这并不容易,也没有得到广泛的支持。更多信息请阅读本文。

#4


1  

I use Cufon. Works great, but you also have to verify licensing.

我使用Cufon。工作很好,但你也必须验证许可。

#5


0  

Here is a link to A million ways to embed custom fonts (and keep typography nerds off your back)

这里有一个链接,你可以找到成千上万种嵌入自定义字体的方法(同时也可以让字体设计的书呆子们远离你)

He recommends sIFR3

他建议sIFR3

#6


0  

With the font stored in a font folder (ex: fontFolder), you would use the @font-face generator to automatically make the user download the font so it would appear wherever on the site you specify. Below, fontFolder represents the directory (folder) where the font files live, and fontName represents the font name (sitting inside the fontFolder). If you currently have the .eot .tff .woff, and .svg variations of the font stored in the fontFolder, you can copy the below code into the top of your style sheet and replace fontFolder with your own directory's name, and replace fontName with the name of your font:

将字体存储在字体文件夹中(例如:fontFolder),您将使用@font-face生成器自动让用户下载字体,以便在指定的站点上显示它。在下面,fontFolder代表字体文件所在的目录(文件夹),而fontName代表字体名称(位于fontFolder中)。如果您当前拥有.eot .tff .woff,以及存储在fontFolder中的字体的.svg变体,您可以将下面的代码复制到样式表的顶部,并将fontFolder替换为您自己的目录的名称,并将fontName替换为您的字体名称:

@font-face {

  font-family: "fontName";

  src: url('fontFolder/fontName.eot');

  src: url('fontFolder/fontName.eot?#iefix') format('embedded-opentype'), 

  url('fontFolder/fontName.woff') format('woff'), 

  url('fontFolder/fontName.ttf') format('truetype'), 

  url('fontFolder/fontName.svg')format('svg');
}

When you're ready to use your font, just use its name:

当你准备使用你的字体时,只需使用它的名字:

h1 {
    font-family: yourFont;
}