https://www.fontsquirrel.com/tools/webfont-generator (这个地址打开,直接可以转换字体)。
        转换字体的步骤:

        点击“upload fonts”按钮上传文件--->选择要转换的类型--->点击“ Yes, the fonts I'm uploading are legally eligible for web embedding.”,出现下载按钮--->点击“download your kit”,即可将转换后得到的字体下载下来。如下图:

字体转换

        当然,第二步第三个选项,是更详细的设置,如下:

字体转换

        下载完成,解压下载的压缩包,得到如下的文件:

字体转换


        最后,将这些字体上传到您的服务器,再使用@font-face定义下这些字体:

/*声明特殊字体 fontNameQty*/
@font-face {
    font-family: 'fontNameQty';
    src: url('fontNameQty/opensans-webfont.eot');
    src: url('fontNameQty/digital-regular-webfont.eot?#iefix') format('embedded-opentype'),
        url('fontNameQty/digital-regular-webfont.woff2') format('woff2'),
        url('fontNameQty/digital-regular-webfont.woff') format('woff'),
        url('fontNameQty/v.ttf') format('truetype'),
        url('fontNameQty/digital-regular-webfont.svg#open_sansregular') format('svg');
    font-weight: normal;
    font-style: normal;
}

        这样,您直接使用您定义的字体名称即可,这里是:“fontNameQty”。

相关文章:

  • 2021-08-11
  • 2022-01-03
  • 2021-12-13
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-09-03
猜你喜欢
  • 2022-01-28
  • 2022-01-29
  • 2021-10-05
  • 2022-01-08
  • 2022-01-11
  • 2021-09-17
  • 2021-12-06
相关资源
相似解决方案