fontello svg
1.0.0
Fontello-SVG是使用相應的CSS文件生成Fontello圖標集的SVG版本的命令行工具。
$ npm install fontello-svg -g您需要從Fontello網站選擇並下載圖標集,然後用--config參數指示config.json文件的路徑。
$ fontello-svg --config fontello-config-file.json
--out ./iconset-directory
--fill-colors " grey:rgb(77,78,83)|blue:rgb(0,149,221) " Usage: fontello-svg --config < config file > --out < dir > [options]
Options:
-h, --help output usage information
-V, --version output the version number
-c, --config < config file > Set the Fontello configuration file (required)
-o, --out < dir > Set the export directory (required)
-f, --fill-colors < colors > Transform the SVG paths to the specified colors. Syntax: --fill-colors " black:rgb(0,0,0) | red:rgb(255,0,0) "
-p, --css-path < path > Set a CSS path for SVG backgrounds
--file-format < format > Override the default filename. Values: {0} - collection, {1} - name, {2} - color. Syntax: --file-format " {0}-{1}-{2}.svg " | --file-format " {0}-Custom-{1}.svg "
--no-css Do not create the CSS file
--no-skip Do not skip existing files
--verbose Verbose outputSara Soueidan撰寫了一篇博客文章,說明瞭如何使用Fontello-SVG和其他工具將圖標與FONT配置轉換為SVG文件。在這裡閱讀:https://sarasoueidan.com/blog/icon-fonts-to-svg/
麻省理工學院