【问题标题】:Gill Sans font family rendering with @font-face使用@font-face 渲染 Gill Sans 字体系列
【发布时间】:2013-09-19 08:39:40
【问题描述】:

我是使用@font-face 渲染字体的新手。我在设计中使用 Gill Sans 字体系列。 我进行了研究以了解使其对我有用,但我无法理解如何使用它。我使用的字体类型没有.eot.woff 字体类型。我只能在我的字体文件夹中看到 gill sans font 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 */
    }

【问题讨论】:

    标签: html css fonts rendering


    【解决方案1】:

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

    http://www.fontsquirrel.com/tools/webfont-generator

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

    body {
        font-family: MyWebFont;
    }
    

    【讨论】:

    • 这对 Gill Sans 不起作用......(Adobe 不会让你)......你必须单独购买网络字体。
    猜你喜欢
    • 2017-10-24
    • 1970-01-01
    • 2016-03-01
    • 2011-09-14
    • 2012-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多