Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Gill Sans字体系列使用@font-face进行渲染_Html_Css_Fonts_Rendering_Pc - Fatal编程技术网

Html Gill Sans字体系列使用@font-face进行渲染

Html Gill Sans字体系列使用@font-face进行渲染,html,css,fonts,rendering,pc,Html,Css,Fonts,Rendering,Pc,我不熟悉使用@font-face呈现字体。我在设计中使用Gill Sans字体系列。 我做了研究,以了解如何让它为我工作,但我无法理解如何使用它。我使用的字体类型没有.eot和.woff字体类型。我可以在我的字体文件夹中看到gill sans字体true type字体 我想看看是否有人能帮助我理解它是如何工作的,并使我使用它变得容易。 我无法理解下面的代码中发生了什么 @font-face { font-family: 'MyWebFont'; src: url('webfont

我不熟悉使用@font-face呈现字体。我在设计中使用Gill Sans字体系列。 我做了研究,以了解如何让它为我工作,但我无法理解如何使用它。我使用的字体类型没有
.eot
.woff
字体类型。我可以在我的字体文件夹中看到gill sans字体true type字体

我想看看是否有人能帮助我理解它是如何工作的,并使我使用它变得容易。 我无法理解下面的代码中发生了什么

@font-face {
    font-family: 'MyWebFont';
    src: url('webfont.eot'); /* IE9 Compat Modes */
    src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
         url('webfont.woff') format('woff'), /* Modern Browsers */
         url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
         url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
    }

谢谢,

不幸的是,不同的浏览器需要不同格式的字体。您可以在此处从.ttf文件生成其他格式:

然后,您可以使用您定义的名称(MyWebFont)在CSS中使用您的字体


但这对Gill Sans不起作用。。。(Adobe不会让你。。。您必须单独购买webfont。
body {
    font-family: MyWebFont;
}