Font CustomICON 字体生成器

联合创作 · 2023-09-29 23:21

Font Custom 可使用命令行从 SVG 集合生成跨浏览器 ICON 字体和支持文件。



 


安装


需要Ruby 1.9.3+ WOFF2 、带有 Python 脚本的FontForge 




# On Mac
brew tap bramstein/webfonttools
brew update
brew install woff2

brew install fontforge --with-python
brew install eot-utils
gem install fontcustom

# On Linux
sudo apt-get install zlib1g-dev fontforge
git clone https://github.com/bramstein/sfnt2woff-zopfli.git sfnt2woff-zopfli && cd sfnt2woff-zopfli && make && mv sfnt2woff-zopfli /usr/local/bin/sfnt2woff
git clone --recursive https://github.com/google/woff2.git && cd woff2 && make clean all && sudo mv woff2_compress /usr/local/bin/ && sudo mv woff2_decompress /usr/local/bin/
gem install fontcustom

Windows注意事项:




  1. 安装 fontforge: http://fontforge.github.io/en-US/downloads/windows/



  • 安装到没有空格的路径,例如 c:\FontForgeBuilds

  • 在安装程序结束时,选中“运行 fontforge”框,它完成了一些设置。



  1. 将安装路径添加到您的系统 PATH 变量 (c:\FontForgeBuilds\bin)

  2. 打开一个新的 fontforge -help命令提示符并测试它。

  3. gem 安装 fontcustom


快速开始




fontcustom compile my/vectors # Compiles icons into `fontcustom/`
fontcustom watch my/vectors # Compiles when vectors are changed/added/removed
fontcustom compile # Uses options from `./fontcustom.yml` or `config/fontcustom.yml`
fontcustom config # Generate a blank a config file
fontcustom help # See all options

配置


要管理编译之间的设置,请运行fontcustom config以生成配置文件。在里面可找到所有选项的列表。


每个选项也可用作覆盖配置文件的破折号命令行标志(例如 --css-selector)。


浏览 26
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报