Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Vector font generation tool(svg files convert to iconfont)

License

NotificationsYou must be signed in to change notification settings

chowa/cwfont

Repository files navigation

cwfont

Vector font generation tool(svg files convert to iconfont)

Build Statusnpmnpmlicense

Install

npm i cwfont -g

Cli Usage

Create

cwfont create <dir>

Compile

cwfont compile

Modify.cwfontrc,Customize the configuration input and output directories, enable hash and exempt CSS modules, and view the specific configurationoptions. (You can use js/json/yaml/yml to write it)

Preview

cwfont preview

API

constChowaFont=require('cwfont');

Generate font

ChowaFont.generator({// executive directorycwd:'xxx',    ...options});

Options

{// compile optionscompile:{// compile syntax, optional CSS | SCSS | lesssyntax:'css',// start value corresponding to font UnicodestartPoint:51666,// font namefontName:'chowa-iconfont',// font file namestyleFileName:'chowa-iconfont',// font selector, {glyph}} must be preceded by a separator, such as: -selector:'.cw-icon-{{glyph}}'},// exempt CSS moduleglobal:false,// using stylelint to format output codestylelint?:boolean;// has options    hash:{// font file with hashfont:false,// style file with hashstyle:false,// length of hashlen:8},// create preview filepreview:true,// format specific configuration view https://prettier.io/docs/en/options.htmlformat:{printWidth:120,tabWidth:4,useTabs:false,semi:true,endOfLine:'lf'},// input optionsinput:{// svg file directorysvgsDir:'./svg-icons',// style file templatestyleTpl:null,// preview file templatepreviewTpl:null},// output optionsoutput:{// font file saving directoryfont:'./',// style file saving directorystyle:'./',// preview file saving directorypreview:'./'}}

Customize template

Attention

  • Svg file names should be free of spaces and special symbols
  • The 'selector' option '{{glyph}}' in the configuration file must be preceded by a separator
  • Drawing SVG graph with single path

License

MIT

Copyright (c) 2020-present, chowa.cn

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp