将TTF格式文字转换成eot格式

1网页中:

1)只针对IE,其他浏览器如Safari 3.x, Firefox 3.1.x, Chrome 2.x只能使用

src: url("foo.ttf") format("truetype")进行定义.

<style>@font-face { font-family:"testing"; src: url("output.eot");}</style>

<divstyle="font-family: testing"> Hello, World! </div>

2)适合IE6, IE7, IE8, Safari 3/4 and Firefox 3.1+

<style>@font-face { font-family:"testing"; src: url("output.ttf") format("truetype");}</style>

<!--[if IE]>

<style>

@font-face {

font-family: "testing";

src: url("output.eot");

}

</style>

<![endif]-->

<divstyle="font-family: testing">Hello, Multiple Browser World! </div>

2、软件ttf2eot.exe的使用,将ttf转换为eot格式

将ttf2eot.ext 与simli.ttf(隶书)放在同一个目录下,运行cmd执行命令:

C:\>ttf2eot.exe simli.ttf.ttf simli.ttf.eot 

执行完成之后指定目录下会生成一个eot格式的文件,即为我们要的eot格式的隶书

你可能感兴趣的:(将TTF格式文字转换成eot格式)