const woffUrl = converter.convert('path/to/your/font.ttf', 'path/to/output/font.woff'); ``` 5. 最后,运行你的Gulp任务,它将自动将指定的字体从TTF格式转换为WOFF格式,并将其输出到指定的路径。 通过使用Web-Fonts-Generator-Service,你可以更轻松地自定义中文字体,并将其应用于网页中。
@font-face{font-family:'iconfont';/*字体名称*/src:url('font/fontello.eot?53711433');/*字体文件路径*/src:url('font/fontello.eot?53711433#iefix') format('embedded-opentype'), url('font/fontello.woff2?53711433') format('woff2'), url('font/fontello.woff?53711433') format('woff'), ur...
Fontieweb-font generator by Pixels|Bytes Fontie easily converts your desktop-fonts into smooth & good-looking web-fonts that work everywhere. It also generates the CSS @font-face that is required to use the fonts on your website. Various options give you the possibilty to fix and optimize...
Web Font Generator One font goes in, all web fonts come out. The purpose of this tool is to automate the generation of web-friendly font formats and@font-faceCSS rules from arbitrary font files, without having to rely on web services or otherwise requiring a network connection. This tool ...
Generator of fonts from SVG icons. Features Supported font formats:WOFF2,WOFF,EOT,TTFandSVG; Support config files: use aJavaScript,JSONorYAMLfile to specify configuration information for an entire directory and all of its subdirectories;
其中,@font-face是指定自定义字体的 CSS at-rule,font-family属性定义了字体名称,src属性定义了字体文件的 URL 地址以及对应的字体格式,font-weight和font-style属性则定义了字体的粗细和样式。在body元素中,我们将自定义字体应用到了页面的文本中。 通过Font Squirrel Webfont Generator,我们可以方便地生成自定义字体...
4、导出字体文件,菜单"File"->"Generate font files",选择文件格式、路径,导出即可完成字体文件制作。 图五、导出的字体文件 备注:一般导出ttf文件,要想转成其它格式文件,笔者推荐这个网站:@FONT-FACE GENERATOR,上传ttf之后,自动生成eot、woff、svg等多种格式,且提供打包下载。
Webfont Generator - Font Squirrel 在上面的代码片段可以看出,要兼容性好的使用 @font-face,我们同时需要 eot 、woff、ttf、svg 格式的字体。常用的工具是 fontsquirrel(http://www.fontsquirrel.com/fontface/generator),一个字体生成器,可以在线生成 eot 、woff、ttf、svg 格式的字体,相信很多前端用过,具体用法...
在Google Fonts出现之前,Font Squirrel是一个可以在任何项目中找到免费的、商业许可的字体的地方。它有很多选择,但遗憾的是没有字体托管选项。您需要下载字体并将它们手动上传到您的网站。并非所有字体都针对网络进行了优化,但您可以尝试使用Webfont Generator。
字客网@font-face生成器可以将上传的字体文件转换为woff2,woff,ttf,eot,svg,otf等Webfont网页字体格式,同时还会生成样直接可以使用的@font-face代码。